home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 Christmas / macformat-045.iso / Shareware Plus / Developers / enteract-377 / enteract-377.sit / EnterAct Stuff / Converting text to HTML / move to hAWK programs / $TextToHTML
MacBinary  |  1996-08-31  |  21.4 KB  |  [TEXT/KEEN]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Aug 31 18:10:56 1996, modified Sat Aug 31 18:10:56 1996, creator 'KEEN', type ASCII, 21001 bytes "$TextToHTML" , at 0x5289 598 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KEEN]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 24 54 65 78 74 54 | 6f 48 54 4d 4c 00 00 00 |..$TextT|oHTML...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 45 45 | 4e 01 00 00 00 00 00 00 |.TEXTKEE|N.......|
|00000050| 00 00 00 00 00 52 09 00 | 00 02 56 ae 4e 68 f0 ae |.....R..|..V.Nh..|
|00000060| 4e 68 f0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |Nh......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 13 34 00 00 |........|.....4..|
|00000080| 23 20 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 67 |# This p|rogram g|
|00000090| 65 6e 65 72 61 74 65 73 | 20 61 20 73 65 74 20 6f |enerates| a set o|
|000000a0| 66 20 48 54 4d 4c 20 64 | 6f 63 75 6d 65 6e 74 73 |f HTML d|ocuments|
|000000b0| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 74 | corresp|onding t|
|000000c0| 6f 20 61 20 74 65 78 74 | 20 64 6f 63 75 6d 65 6e |o a text| documen|
|000000d0| 74 0d 23 20 28 6f 6e 65 | 20 66 6f 72 20 65 61 63 |t.# (one| for eac|
|000000e0| 68 20 63 68 61 70 74 65 | 72 20 61 6e 64 20 61 20 |h chapte|r and a |
|000000f0| 74 61 62 6c 65 20 6f 66 | 20 63 6f 6e 74 65 6e 74 |table of| content|
|00000100| 73 2c 20 61 73 20 65 78 | 70 6c 61 69 6e 65 64 20 |s, as ex|plained |
|00000110| 62 65 6c 6f 77 29 2e 0d | 0d 23 20 49 66 20 79 6f |below)..|.# If yo|
|00000120| 75 72 20 64 6f 63 75 6d | 65 6e 74 20 63 6f 6e 74 |ur docum|ent cont|
|00000130| 61 69 6e 73 20 69 6c 6c | 75 73 74 72 61 74 69 6f |ains ill|ustratio|
|00000140| 6e 73 2c 20 79 6f 75 20 | 6d 75 73 74 20 68 61 76 |ns, you |must hav|
|00000150| 65 20 63 72 65 61 74 65 | 64 20 74 68 65 20 64 6f |e create|d the do|
|00000160| 63 75 6d 65 6e 74 20 77 | 69 74 68 0d 23 20 45 6e |cument w|ith.# En|
|00000170| 74 65 72 41 63 74 20 33 | 2e 37 20 6f 72 20 6c 61 |terAct 3|.7 or la|
|00000180| 74 65 72 20 28 77 68 69 | 63 68 20 70 6c 61 63 65 |ter (whi|ch place|
|00000190| 73 20 61 6c 6c 20 50 49 | 43 54 73 20 69 6e 20 74 |s all PI|CTs in t|
|000001a0| 68 65 20 72 65 73 6f 75 | 72 63 65 20 66 6f 72 6b |he resou|rce fork|
|000001b0| 20 61 6e 64 20 6e 75 6d | 62 65 72 73 0d 23 20 74 | and num|bers.# t|
|000001c0| 68 65 6d 20 31 30 30 30 | 2c 20 31 30 30 31 2c 20 |hem 1000|, 1001, |
|000001d0| 31 30 30 32 2e 2e 2e 31 | 34 30 30 29 2e 20 4d 6f |1002...1|400). Mo|
|000001e0| 72 65 20 65 78 61 63 74 | 6c 79 2c 20 69 66 20 79 |re exact|ly, if y|
|000001f0| 6f 75 20 68 61 76 65 20 | 61 6e 20 6f 6c 64 20 45 |ou have |an old E|
|00000200| 6e 74 65 72 41 63 74 20 | 64 6f 63 75 6d 65 6e 74 |nterAct |document|
|00000210| 0d 23 20 79 6f 75 20 6d | 75 73 74 20 69 6e 73 65 |.# you m|ust inse|
|00000220| 72 74 20 6f 72 20 64 65 | 6c 65 74 65 20 61 74 20 |rt or de|lete at |
|00000230| 6c 65 61 73 74 20 6f 6e | 65 20 70 69 63 74 75 72 |least on|e pictur|
|00000240| 65 20 75 73 69 6e 67 20 | 45 6e 74 65 72 41 63 74 |e using |EnterAct|
|00000250| 20 33 2e 37 20 6f 72 20 | 6c 61 74 65 72 2c 20 69 | 3.7 or |later, i|
|00000260| 6e 0d 23 20 6f 72 64 65 | 72 20 74 6f 20 66 6f 72 |n.# orde|r to for|
|00000270| 63 65 20 72 65 6e 75 6d | 62 65 72 69 6e 67 20 6f |ce renum|bering o|
|00000280| 66 20 74 68 65 20 70 69 | 63 74 75 72 65 73 2e 20 |f the pi|ctures. |
|00000290| 49 66 20 79 6f 75 27 72 | 65 20 6e 6f 74 20 73 75 |If you'r|e not su|
|000002a0| 72 65 2c 20 75 73 65 20 | 61 20 72 65 73 6f 75 72 |re, use |a resour|
|000002b0| 63 65 0d 23 20 65 64 69 | 74 6f 72 20 74 6f 20 63 |ce.# edi|tor to c|
|000002c0| 68 65 63 6b 20 74 68 65 | 20 6e 75 6d 62 65 72 69 |heck the| numberi|
|000002d0| 6e 67 20 6f 66 20 74 68 | 65 20 50 49 43 54 73 20 |ng of th|e PICTs |
|000002e0| 69 6e 20 74 68 65 20 64 | 6f 63 27 73 20 72 65 73 |in the d|oc's res|
|000002f0| 6f 75 72 63 65 20 66 6f | 72 6b 2e 0d 0d 23 20 41 |ource fo|rk...# A|
|00000300| 6e 20 6f 76 65 72 76 69 | 65 77 20 6f 66 20 74 68 |n overvi|ew of th|
|00000310| 65 20 77 68 6f 6c 65 20 | 70 72 6f 63 65 73 73 2c |e whole |process,|
|00000320| 20 75 73 69 6e 67 20 22 | 45 6e 74 65 72 41 63 74 | using "|EnterAct|
|00000330| 20 33 20 4d 61 6e 75 61 | 6c 22 20 61 73 20 61 6e | 3 Manua|l" as an|
|00000340| 20 65 78 61 6d 70 6c 65 | 3a 0d 23 20 a5 20 67 65 | example|:.# . ge|
|00000350| 74 20 61 20 63 6f 70 79 | 20 6f 66 20 22 63 6c 69 |t a copy| of "cli|
|00000360| 70 32 67 69 66 22 20 62 | 79 20 59 76 65 73 20 50 |p2gif" b|y Yves P|
|00000370| 69 67 75 65 74 20 28 63 | 68 65 63 6b 20 79 6f 75 |iguet (c|heck you|
|00000380| 72 20 43 44 27 73 2c 20 | 6f 72 20 41 6e 61 72 63 |r CD's, |or Anarc|
|00000390| 68 69 65 20 74 6f 20 49 | 6e 66 6f 2d 4d 61 63 29 |hie to I|nfo-Mac)|
|000003a0| 0d 23 20 a5 20 73 74 72 | 75 63 74 75 72 65 20 79 |.# . str|ucture y|
|000003b0| 6f 75 72 20 64 6f 63 75 | 6d 65 6e 74 20 28 22 45 |our docu|ment ("E|
|000003c0| 6e 74 65 72 41 63 74 20 | 33 20 4d 61 6e 75 61 6c |nterAct |3 Manual|
|000003d0| 22 29 2c 20 75 73 69 6e | 67 20 45 6e 74 65 72 41 |"), usin|g EnterA|
|000003e0| 63 74 20 69 66 20 79 6f | 75 20 68 61 76 65 20 50 |ct if yo|u have P|
|000003f0| 49 43 54 20 69 6c 6c 75 | 73 74 72 61 74 69 6f 6e |ICT illu|stration|
|00000400| 73 0d 23 09 09 28 6d 6f | 72 65 20 6f 6e 20 74 68 |s.#..(mo|re on th|
|00000410| 69 73 20 69 6d 70 6f 72 | 74 61 6e 74 20 73 74 65 |is impor|tant ste|
|00000420| 70 20 62 65 6c 6f 77 29 | 0d 23 20 a5 20 63 72 65 |p below)|.# . cre|
|00000430| 61 74 65 20 61 20 66 6f | 6c 64 65 72 20 74 6f 20 |ate a fo|lder to |
|00000440| 68 6f 6c 64 20 74 68 65 | 20 68 74 6d 6c 20 76 65 |hold the| html ve|
|00000450| 72 73 69 6f 6e 20 6f 66 | 20 79 6f 75 72 20 64 6f |rsion of| your do|
|00000460| 63 75 6d 65 6e 74 2c 20 | 61 6e 64 20 77 69 74 68 |cument, |and with|
|00000470| 69 6e 20 69 74 0d 23 20 | 09 63 72 65 61 74 65 20 |in it.# |.create |
|00000480| 61 20 66 6f 6c 64 65 72 | 20 74 6f 20 68 6f 6c 64 |a folder| to hold|
|00000490| 20 74 68 65 20 67 69 66 | 73 20 28 22 44 69 73 6b | the gif|s ("Disk|
|000004a0| 3a 2e 2e 2e 3a 45 33 4d | 5f 48 54 4d 4c 3a 47 72 |:...:E3M|_HTML:Gr|
|000004b0| 61 70 68 69 63 73 3a 22 | 29 0d 23 20 a5 20 72 75 |aphics:"|).# . ru|
|000004c0| 6e 20 74 68 65 20 73 63 | 72 69 70 74 20 22 50 49 |n the sc|ript "PI|
|000004d0| 43 54 20 72 73 72 63 73 | 20 74 6f 20 6e 75 6d 62 |CT rsrcs| to numb|
|000004e0| 65 72 65 64 20 67 69 66 | 73 22 20 66 72 6f 6d 20 |ered gif|s" from |
|000004f0| 77 69 74 68 69 6e 20 45 | 6e 74 65 72 41 63 74 3a |within E|nterAct:|
|00000500| 20 69 6e 20 74 68 65 0d | 23 20 09 66 69 72 73 74 | in the.|# .first|
|00000510| 20 64 69 61 6c 6f 67 2c | 20 73 65 6c 65 63 74 20 | dialog,| select |
|00000520| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 20 74 6f 20 |the docu|ment to |
|00000530| 63 6f 6e 76 65 72 74 20 | 28 22 45 6e 74 65 72 41 |convert |("EnterA|
|00000540| 63 74 20 33 20 4d 61 6e | 75 61 6c 22 29 3b 20 69 |ct 3 Man|ual"); i|
|00000550| 6e 20 74 68 65 20 73 65 | 63 6f 6e 64 0d 23 20 09 |n the se|cond.# .|
|00000560| 64 69 61 6c 6f 67 2c 20 | 73 65 6c 65 63 74 20 74 |dialog, |select t|
|00000570| 68 65 20 66 6f 6c 64 65 | 72 20 74 6f 20 68 6f 6c |he folde|r to hol|
|00000580| 64 20 74 68 65 20 67 69 | 66 73 20 28 22 47 72 61 |d the gi|fs ("Gra|
|00000590| 70 68 69 63 73 22 29 2e | 20 4e 4f 54 45 20 74 6f |phics").| NOTE to|
|000005a0| 20 61 76 6f 69 64 20 62 | 65 69 6e 67 20 70 65 73 | avoid b|eing pes|
|000005b0| 74 65 72 65 64 0d 23 20 | 09 61 62 6f 75 74 20 77 |tered.# |.about w|
|000005c0| 68 65 72 65 20 22 63 6c | 69 70 32 67 69 66 22 20 |here "cl|ip2gif" |
|000005d0| 69 73 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 6f |is, you |should o|
|000005e0| 70 65 6e 20 74 68 65 20 | 73 63 72 69 70 74 20 75 |pen the |script u|
|000005f0| 73 69 6e 67 20 41 70 70 | 6c 65 27 73 20 22 53 63 |sing App|le's "Sc|
|00000600| 72 69 70 74 20 45 64 69 | 74 6f 72 22 20 66 69 72 |ript Edi|tor" fir|
|00000610| 73 74 2c 0d 23 20 09 61 | 6e 64 20 74 68 65 6e 20 |st,.# .a|nd then |
|00000620| 61 66 74 65 72 20 79 6f | 75 20 68 61 76 65 20 72 |after yo|u have r|
|00000630| 65 6c 6f 63 61 74 65 64 | 20 22 63 6c 69 70 32 67 |elocated| "clip2g|
|00000640| 69 66 22 20 28 79 6f 75 | 20 77 69 6c 6c 20 62 65 |if" (you| will be|
|00000650| 20 61 73 6b 65 64 20 74 | 6f 20 64 6f 20 73 6f 20 | asked t|o do so |
|00000660| 62 79 20 53 63 72 69 70 | 74 20 45 64 69 74 6f 72 |by Scrip|t Editor|
|00000670| 29 0d 23 20 09 64 6f 20 | 61 20 53 61 76 65 2e 0d |).# .do |a Save..|
|00000680| 23 20 a5 20 77 68 65 6e | 20 22 50 49 43 54 20 72 |# . when| "PICT r|
|00000690| 73 72 63 73 20 74 6f 20 | 6e 75 6d 62 65 72 65 64 |srcs to |numbered|
|000006a0| 20 67 69 66 73 22 20 69 | 73 20 64 6f 6e 65 2c 20 | gifs" i|s done, |
|000006b0| 69 74 20 70 72 65 73 65 | 6e 74 73 20 79 6f 75 20 |it prese|nts you |
|000006c0| 77 69 74 68 20 61 20 63 | 6f 6d 6d 61 6e 64 0d 23 |with a c|ommand.#|
|000006d0| 20 09 6c 69 6e 65 20 74 | 6f 20 72 75 6e 20 74 68 | .line t|o run th|
|000006e0| 69 73 20 70 72 6f 67 72 | 61 6d 3a 20 73 65 6c 65 |is progr|am: sele|
|000006f0| 63 74 20 69 74 20 61 6e | 64 20 68 69 74 20 3c 65 |ct it an|d hit <e|
|00000700| 6e 74 65 72 3e 20 74 6f | 20 72 75 6e 20 69 74 2e |nter> to| run it.|
|00000710| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 61 6c 73 6f | You sho|uld also|
|00000720| 0d 23 09 73 61 76 65 20 | 74 68 65 20 63 6f 6d 6d |.#.save |the comm|
|00000730| 61 6e 64 20 6c 69 6e 65 | 28 73 29 20 61 77 61 79 |and line|(s) away|
|00000740| 20 73 6f 6d 65 77 68 65 | 72 65 20 66 6f 72 20 66 | somewhe|re for f|
|00000750| 75 74 75 72 65 20 72 65 | 66 65 72 65 6e 63 65 2e |uture re|ference.|
|00000760| 20 49 74 20 6c 6f 6f 6b | 73 20 6c 69 6b 65 20 74 | It look|s like t|
|00000770| 68 69 73 3a 0d 23 09 09 | 68 41 57 4b 20 2d 66 24 |his:.#..|hAWK -f$|
|00000780| 54 65 78 74 54 6f 48 54 | 4d 4c 20 2d 76 67 69 66 |TextToHT|ML -vgif|
|00000790| 4c 69 73 74 3d 22 44 69 | 73 6b 3a 43 57 20 43 45 |List="Di|sk:CW CE|
|000007a0| 44 41 52 3a 45 33 4d 5f | 48 54 4d 4c 3a 47 72 61 |DAR:E3M_|HTML:Gra|
|000007b0| 70 68 69 63 73 3a 55 6e | 73 6f 72 74 65 64 20 67 |phics:Un|sorted g|
|000007c0| 69 66 20 6c 69 73 74 22 | 0d 23 09 09 09 2d 2d 20 |if list"|.#...-- |
|000007d0| 22 44 69 73 6b 3a 43 57 | 20 43 45 44 41 52 3a 45 |"Disk:CW| CEDAR:E|
|000007e0| 6e 74 65 72 41 63 74 20 | 53 74 75 66 66 3a 44 6f |nterAct |Stuff:Do|
|000007f0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 3a 45 6e 74 65 |cumentat|ion:Ente|
|00000800| 72 41 63 74 20 33 20 4d | 61 6e 75 61 6c 22 0d 23 |rAct 3 M|anual".#|
|00000810| 09 28 69 74 20 77 69 6c | 6c 20 62 65 20 73 74 6f |.(it wil|l be sto|
|00000820| 72 65 64 20 69 6e 20 74 | 68 65 20 66 69 6c 65 20 |red in t|he file |
|00000830| 22 24 74 65 6d 70 53 63 | 72 69 70 74 52 65 73 75 |"$tempSc|riptResu|
|00000840| 6c 74 22 20 75 6e 74 69 | 6c 20 79 6f 75 20 72 75 |lt" unti|l you ru|
|00000850| 6e 20 79 6f 75 72 20 6e | 65 78 74 20 73 63 72 69 |n your n|ext scri|
|00000860| 70 74 20 77 69 74 68 20 | 45 6e 74 65 72 41 63 74 |pt with |EnterAct|
|00000870| 29 0d 23 20 a5 20 77 68 | 65 6e 20 74 68 69 73 20 |).# . wh|en this |
|00000880| 70 72 6f 67 72 61 6d 20 | 69 73 20 64 6f 6e 65 2c |program |is done,|
|00000890| 20 74 68 65 72 65 20 77 | 69 6c 6c 20 62 65 20 61 | there w|ill be a|
|000008a0| 20 22 43 6f 6e 74 65 6e | 74 73 2e 68 74 6d 6c 22 | "Conten|ts.html"|
|000008b0| 20 66 69 6c 65 20 61 74 | 20 74 68 65 20 74 6f 70 | file at| the top|
|000008c0| 0d 23 20 09 6f 66 20 74 | 68 65 20 66 6f 6c 64 65 |.# .of t|he folde|
|000008d0| 72 20 74 68 61 74 20 68 | 6f 6c 64 73 20 74 68 65 |r that h|olds the|
|000008e0| 20 68 74 6d 6c 20 76 65 | 72 73 69 6f 6e 20 6f 66 | html ve|rsion of|
|000008f0| 20 79 6f 75 72 20 64 6f | 63 75 6d 65 6e 74 2c 20 | your do|cument, |
|00000900| 61 6e 64 20 61 6c 73 6f | 0d 23 20 09 77 69 74 68 |and also|.# .with|
|00000910| 69 6e 20 69 74 20 77 69 | 6c 6c 20 62 65 20 61 20 |in it wi|ll be a |
|00000920| 22 54 65 78 74 22 20 66 | 6f 6c 64 65 72 20 68 6f |"Text" f|older ho|
|00000930| 6c 64 69 6e 67 20 74 68 | 65 20 63 68 61 70 74 65 |lding th|e chapte|
|00000940| 72 20 64 6f 63 75 6d 65 | 6e 74 73 2c 20 61 6e 64 |r docume|nts, and|
|00000950| 0d 23 20 09 79 6f 75 72 | 20 66 6f 6c 64 65 72 20 |.# .your| folder |
|00000960| 66 6f 72 20 74 68 65 20 | 67 69 66 73 20 77 69 6c |for the |gifs wil|
|00000970| 6c 20 62 65 20 63 68 6f | 63 6b 20 66 75 6c 6c 20 |l be cho|ck full |
|00000980| 6f 66 20 67 69 66 73 2e | 0d 23 20 a5 20 64 72 61 |of gifs.|.# . dra|
|00000990| 67 20 74 68 65 20 22 43 | 6f 6e 74 65 6e 74 73 2e |g the "C|ontents.|
|000009a0| 68 74 6d 6c 22 20 66 69 | 6c 65 20 6f 6e 74 6f 20 |html" fi|le onto |
|000009b0| 79 6f 75 72 20 66 61 76 | 6f 75 72 69 74 65 20 62 |your fav|ourite b|
|000009c0| 72 6f 77 73 65 72 20 61 | 6e 64 20 76 65 72 69 66 |rowser a|nd verif|
|000009d0| 79 20 74 68 61 74 0d 23 | 20 09 74 68 69 6e 67 73 |y that.#| .things|
|000009e0| 20 63 61 6d 65 20 6f 75 | 74 20 74 68 65 20 77 61 | came ou|t the wa|
|000009f0| 79 20 79 6f 75 20 77 61 | 6e 74 65 64 2e 0d 0d 23 |y you wa|nted...#|
|00000a00| 20 49 66 20 79 6f 75 72 | 20 64 6f 63 75 6d 65 6e | If your| documen|
|00000a10| 74 20 63 6f 6e 74 61 69 | 6e 73 20 6e 6f 20 69 6c |t contai|ns no il|
|00000a20| 6c 75 73 74 72 61 74 69 | 6f 6e 73 20 74 68 65 6e |lustrati|ons then|
|00000a30| 20 79 6f 75 20 64 6f 6e | 27 74 20 6e 65 65 64 20 | you don|'t need |
|00000a40| 74 6f 20 72 75 6e 20 74 | 68 65 0d 23 20 22 50 49 |to run t|he.# "PI|
|00000a50| 43 54 20 72 73 72 63 73 | 20 74 6f 20 6e 75 6d 62 |CT rsrcs| to numb|
|00000a60| 65 72 65 64 20 67 69 66 | 73 22 20 73 63 72 69 70 |ered gif|s" scrip|
|00000a70| 74 20 66 69 72 73 74 2e | 20 42 75 74 20 79 6f 75 |t first.| But you|
|00000a80| 20 73 74 69 6c 6c 20 6e | 65 65 64 20 74 6f 20 63 | still n|eed to c|
|00000a90| 6f 6e 73 74 72 75 63 74 | 0d 23 20 61 20 63 6f 6d |onstruct|.# a com|
|00000aa0| 6d 61 6e 64 20 6c 69 6e | 65 20 74 6f 20 72 75 6e |mand lin|e to run|
|00000ab0| 20 74 68 69 73 20 70 72 | 6f 67 72 61 6d 2e 20 46 | this pr|ogram. F|
|00000ac0| 69 72 73 74 20 63 72 65 | 61 74 65 20 61 20 66 6f |irst cre|ate a fo|
|00000ad0| 6c 64 65 72 20 74 6f 20 | 68 6f 6c 64 20 74 68 65 |lder to |hold the|
|00000ae0| 20 72 65 73 75 6c 74 73 | 0d 23 20 28 65 67 20 22 | results|.# (eg "|
|00000af0| 44 69 73 6b 3a 2e 2e 2e | 3a 4d 79 44 6f 63 20 48 |Disk:...|:MyDoc H|
|00000b00| 54 4d 4c 3a 22 29 2e 20 | 52 65 6d 65 6d 62 65 72 |TML:"). |Remember|
|00000b10| 20 74 68 65 20 66 75 6c | 6c 20 70 61 74 68 20 6e | the ful|l path n|
|00000b20| 61 6d 65 73 20 66 6f 72 | 20 74 68 69 73 20 66 6f |ames for| this fo|
|00000b30| 6c 64 65 72 20 61 6e 64 | 20 66 6f 72 0d 23 20 79 |lder and| for.# y|
|00000b40| 6f 75 72 20 73 6f 75 72 | 63 65 20 64 6f 63 75 6d |our sour|ce docum|
|00000b50| 65 6e 74 20 28 22 4d 79 | 44 6f 63 22 29 2e 20 59 |ent ("My|Doc"). Y|
|00000b60| 6f 75 72 20 63 6f 6d 6d | 61 6e 64 20 6c 69 6e 65 |our comm|and line|
|00000b70| 20 73 68 6f 75 6c 64 20 | 74 68 65 6e 20 6c 6f 6f | should |then loo|
|00000b80| 6b 20 6c 69 6b 65 20 74 | 68 69 73 3a 0d 23 20 68 |k like t|his:.# h|
|00000b90| 41 57 4b 20 2d 66 24 54 | 65 78 74 54 6f 48 54 4d |AWK -f$T|extToHTM|
|00000ba0| 4c 20 2d 76 67 69 66 4c | 69 73 74 3d 22 44 69 73 |L -vgifL|ist="Dis|
|00000bb0| 6b 3a 2e 2e 2e 3a 4d 79 | 44 6f 63 20 48 54 4d 4c |k:...:My|Doc HTML|
|00000bc0| 3a 47 72 61 70 68 69 63 | 73 3a 55 6e 73 6f 72 74 |:Graphic|s:Unsort|
|00000bd0| 65 64 20 67 69 66 20 6c | 69 73 74 22 0d 23 20 2d |ed gif l|ist".# -|
|00000be0| 2d 20 22 44 69 73 6b 3a | 2e 2e 2e 3a 4d 79 44 6f |- "Disk:|...:MyDo|
|00000bf0| 63 22 0d 23 20 4e 6f 74 | 65 20 74 68 61 74 20 6e |c".# Not|e that n|
|00000c00| 65 69 74 68 65 72 20 74 | 68 65 20 22 47 72 61 70 |either t|he "Grap|
|00000c10| 68 69 63 73 22 20 66 6f | 6c 64 65 72 20 6e 6f 72 |hics" fo|lder nor|
|00000c20| 20 74 68 65 20 66 69 6c | 65 20 22 55 6e 73 6f 72 | the fil|e "Unsor|
|00000c30| 74 65 64 20 67 69 66 20 | 6c 69 73 74 22 20 77 69 |ted gif |list" wi|
|00000c40| 6c 6c 0d 23 20 65 78 69 | 73 74 2c 20 62 75 74 20 |ll.# exi|st, but |
|00000c50| 79 6f 75 20 73 74 69 6c | 6c 20 6e 65 65 64 20 74 |you stil|l need t|
|00000c60| 6f 20 69 6e 63 6c 75 64 | 65 20 74 68 65 6d 20 69 |o includ|e them i|
|00000c70| 6e 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |n the co|mmand li|
|00000c80| 6e 65 20 61 72 67 75 6d | 65 6e 74 2e 20 54 68 69 |ne argum|ent. Thi|
|00000c90| 73 0d 23 20 69 73 20 61 | 20 6d 69 6e 6f 72 20 6e |s.# is a| minor n|
|00000ca0| 75 69 73 61 6e 63 65 2c | 20 62 75 74 20 69 66 20 |uisance,| but if |
|00000cb0| 79 6f 75 20 65 76 65 72 | 20 64 65 63 69 64 65 20 |you ever| decide |
|00000cc0| 74 6f 20 69 6e 63 6c 75 | 64 65 20 69 6c 6c 75 73 |to inclu|de illus|
|00000cd0| 74 72 61 74 69 6f 6e 73 | 20 69 6e 20 79 6f 75 72 |trations| in your|
|00000ce0| 0d 23 20 64 6f 63 75 6d | 65 6e 74 20 74 68 65 6e |.# docum|ent then|
|00000cf0| 20 61 6c 6c 20 79 6f 75 | 20 68 61 76 65 20 74 6f | all you| have to|
|00000d00| 20 64 6f 20 69 73 20 63 | 72 65 61 74 65 20 74 68 | do is c|reate th|
|00000d10| 65 20 61 63 74 75 61 6c | 20 22 47 72 61 70 68 69 |e actual| "Graphi|
|00000d20| 63 73 22 20 66 6f 6c 64 | 65 72 20 77 69 74 68 69 |cs" fold|er withi|
|00000d30| 6e 0d 23 20 74 68 65 20 | 22 4d 79 44 6f 63 20 48 |n.# the |"MyDoc H|
|00000d40| 54 4d 4c 22 20 66 6f 6c | 64 65 72 2c 20 72 75 6e |TML" fol|der, run|
|00000d50| 20 74 68 65 20 73 63 72 | 69 70 74 20 22 50 49 43 | the scr|ipt "PIC|
|00000d60| 54 20 72 73 72 63 73 20 | 74 6f 20 6e 75 6d 62 65 |T rsrcs |to numbe|
|00000d70| 72 65 64 20 67 69 66 73 | 22 2c 20 61 6e 64 0d 23 |red gifs|", and.#|
|00000d80| 20 74 68 65 6e 20 72 75 | 6e 20 74 68 65 20 65 78 | then ru|n the ex|
|00000d90| 61 63 74 20 73 61 6d 65 | 20 63 6f 6d 6d 61 6e 64 |act same| command|
|00000da0| 20 6c 69 6e 65 20 74 68 | 61 74 20 79 6f 75 20 70 | line th|at you p|
|00000db0| 72 6f 64 75 63 65 64 20 | 61 62 6f 76 65 20 28 6f |roduced |above (o|
|00000dc0| 72 20 72 75 6e 20 74 68 | 65 0d 23 20 63 6f 6d 6d |r run th|e.# comm|
|00000dd0| 61 6e 64 20 6c 69 6e 65 | 20 74 68 61 74 20 74 68 |and line| that th|
|00000de0| 65 20 73 63 72 69 70 74 | 20 70 72 6f 64 75 63 65 |e script| produce|
|00000df0| 73 2c 20 77 68 69 63 68 | 20 77 69 6c 6c 20 62 65 |s, which| will be|
|00000e00| 20 65 78 61 63 74 6c 79 | 20 74 68 65 20 73 61 6d | exactly| the sam|
|00000e10| 65 29 2e 0d 0d 0d 23 20 | 54 68 65 20 6f 6e 6c 79 |e)....# |The only|
|00000e20| 20 74 72 69 63 6b 79 20 | 62 69 74 20 68 65 72 65 | tricky |bit here|
|00000e30| 20 69 73 20 73 74 72 75 | 63 74 75 72 69 6e 67 20 | is stru|cturing |
|00000e40| 79 6f 75 72 20 64 6f 63 | 75 6d 65 6e 74 20 73 6f |your doc|ument so|
|00000e50| 20 74 68 61 74 20 74 68 | 69 73 20 70 72 6f 67 72 | that th|is progr|
|00000e60| 61 6d 20 63 61 6e 0d 23 | 20 63 6f 6e 76 65 72 74 |am can.#| convert|
|00000e70| 20 74 68 65 20 73 74 72 | 75 63 74 75 72 65 20 69 | the str|ucture i|
|00000e80| 6e 74 6f 20 70 72 6f 70 | 65 72 20 68 74 6d 6c 20 |nto prop|er html |
|00000e90| 66 6f 72 6d 61 74 74 69 | 6e 67 2e 20 43 68 61 72 |formatti|ng. Char|
|00000ea0| 61 63 74 65 72 73 20 69 | 6e 20 79 6f 75 72 20 74 |acters i|n your t|
|00000eb0| 65 78 74 20 68 61 76 65 | 20 74 6f 0d 23 20 63 6c |ext have| to.# cl|
|00000ec0| 65 61 72 6c 79 20 73 69 | 67 6e 61 6c 20 77 68 65 |early si|gnal whe|
|00000ed0| 72 65 20 68 65 61 64 69 | 6e 67 73 20 61 72 65 2c |re headi|ngs are,|
|00000ee0| 20 77 68 65 72 65 20 6c | 69 73 74 73 20 73 74 61 | where l|ists sta|
|00000ef0| 72 74 2c 20 61 6e 64 20 | 73 6f 20 6f 6e 2e 20 54 |rt, and |so on. T|
|00000f00| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 69 73 0d 23 |his prog|ram is.#|
|00000f10| 20 73 65 74 20 75 70 20 | 74 6f 20 68 61 6e 64 6c | set up |to handl|
|00000f20| 65 20 61 20 73 70 65 63 | 69 66 69 63 20 66 69 78 |e a spec|ific fix|
|00000f30| 65 64 20 73 74 72 75 63 | 74 75 72 65 2c 20 61 6e |ed struc|ture, an|
|00000f40| 64 20 69 66 20 79 6f 75 | 72 20 64 6f 63 75 6d 65 |d if you|r docume|
|00000f50| 6e 74 20 64 6f 65 73 6e | 27 74 20 66 6f 6c 6c 6f |nt doesn|'t follo|
|00000f60| 77 0d 23 20 74 68 69 73 | 20 73 74 72 75 63 74 75 |w.# this| structu|
|00000f70| 72 65 20 79 6f 75 27 6c | 6c 20 68 61 76 65 20 74 |re you'l|l have t|
|00000f80| 6f 20 63 68 61 6e 67 65 | 20 65 69 74 68 65 72 20 |o change| either |
|00000f90| 79 6f 75 72 20 64 6f 63 | 75 6d 65 6e 74 20 6f 72 |your doc|ument or|
|00000fa0| 20 74 68 69 73 20 70 72 | 6f 67 72 61 6d 2c 0d 23 | this pr|ogram,.#|
|00000fb0| 20 77 68 69 63 68 65 76 | 65 72 20 73 65 65 6d 73 | whichev|er seems|
|00000fc0| 20 65 61 73 69 65 72 2e | 0d 0d 23 20 54 68 65 20 | easier.|..# The |
|00000fd0| 22 45 6e 74 65 72 41 63 | 74 20 33 20 4d 61 6e 75 |"EnterAc|t 3 Manu|
|00000fe0| 61 6c 22 20 69 73 20 61 | 6e 20 65 78 61 6d 70 6c |al" is a|n exampl|
|00000ff0| 65 20 6f 66 20 61 20 64 | 6f 63 75 6d 65 6e 74 20 |e of a d|ocument |
|00001000| 73 74 72 75 63 74 75 72 | 65 64 20 66 6f 72 20 75 |structur|ed for u|
|00001010| 73 65 20 77 69 74 68 0d | 23 20 74 68 69 73 20 70 |se with.|# this p|
|00001020| 72 6f 67 72 61 6d 2c 20 | 62 72 6f 77 73 65 20 74 |rogram, |browse t|
|00001030| 68 72 6f 75 67 68 20 69 | 74 20 61 73 20 79 6f 75 |hrough i|t as you|
|00001040| 20 72 65 61 64 20 74 68 | 65 20 72 75 6c 65 73 20 | read th|e rules |
|00001050| 62 65 6c 6f 77 2e 0d 0d | 23 20 48 65 72 65 20 61 |below...|# Here a|
|00001060| 72 65 20 74 68 65 20 73 | 74 72 75 63 74 75 72 69 |re the s|tructuri|
|00001070| 6e 67 20 72 75 6c 65 73 | 20 74 68 61 74 20 74 68 |ng rules| that th|
|00001080| 69 73 20 70 72 6f 67 72 | 61 6d 20 65 78 70 65 63 |is progr|am expec|
|00001090| 74 73 3a 0d 23 20 a5 20 | 46 69 72 73 74 20 6c 69 |ts:.# . |First li|
|000010a0| 6e 65 3a 20 70 72 65 73 | 75 6d 65 64 20 74 6f 20 |ne: pres|umed to |
|000010b0| 62 65 20 74 68 65 20 74 | 69 74 6c 65 2c 20 73 6b |be the t|itle, sk|
|000010c0| 69 70 20 69 74 20 28 74 | 68 65 20 74 69 74 6c 65 |ip it (t|he title|
|000010d0| 20 69 73 20 69 6e 73 74 | 65 61 64 20 74 61 6b 65 | is inst|ead take|
|000010e0| 6e 20 66 72 6f 6d 0d 23 | 20 09 74 68 65 20 6e 61 |n from.#| .the na|
|000010f0| 6d 65 20 6f 66 20 74 68 | 65 20 64 6f 63 75 6d 65 |me of th|e docume|
|00001100| 6e 74 29 0d 23 20 a5 20 | 45 61 63 68 20 63 68 61 |nt).# . |Each cha|
|00001110| 70 74 65 72 20 74 69 74 | 6c 65 20 73 68 6f 75 6c |pter tit|le shoul|
|00001120| 64 20 62 65 20 62 65 74 | 77 65 65 6e 20 22 64 61 |d be bet|ween "da|
|00001130| 73 68 2d 73 70 61 63 65 | 22 20 6c 69 6e 65 73 20 |sh-space|" lines |
|00001140| 2d 20 2d 20 2d 20 2d 20 | 2d 2c 0d 23 20 09 74 68 |- - - - |-,.# .th|
|00001150| 61 74 20 69 73 20 6f 6e | 65 20 64 61 73 68 2d 73 |at is on|e dash-s|
|00001160| 70 61 63 65 20 6c 69 6e | 65 20 62 65 66 6f 72 65 |pace lin|e before|
|00001170| 20 74 68 65 20 63 68 61 | 70 74 65 72 20 74 69 74 | the cha|pter tit|
|00001180| 6c 65 2c 20 61 6e 64 20 | 61 6e 6f 74 68 65 72 0d |le, and |another.|
|00001190| 23 20 09 64 61 73 68 2d | 73 70 61 63 65 20 6c 69 |# .dash-|space li|
|000011a0| 6e 65 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 20 61 |ne immed|iately a|
|000011b0| 66 74 65 72 2e 20 54 68 | 65 20 22 64 61 73 68 20 |fter. Th|e "dash |
|000011c0| 73 70 61 63 65 22 20 6c | 69 6e 65 20 73 68 6f 75 |space" l|ine shou|
|000011d0| 6c 64 20 62 65 67 69 6e | 0d 23 20 09 77 69 74 68 |ld begin|.# .with|
|000011e0| 20 61 20 64 61 73 68 20 | 27 2d 27 2c 20 61 6e 64 | a dash |'-', and|
|000011f0| 20 74 68 65 20 6c 69 6e | 65 20 73 68 6f 75 6c 64 | the lin|e should|
|00001200| 20 63 6f 6e 74 61 69 6e | 20 6f 6e 6c 79 20 64 61 | contain| only da|
|00001210| 73 68 65 73 20 61 6e 64 | 20 73 70 61 63 65 73 20 |shes and| spaces |
|00001220| 69 6e 0d 23 20 09 61 6e | 79 20 6d 69 78 20 79 6f |in.# .an|y mix yo|
|00001230| 75 20 6c 69 6b 65 20 61 | 66 74 65 72 20 74 68 65 |u like a|fter the|
|00001240| 20 73 74 61 72 74 69 6e | 67 20 64 61 73 68 2c 20 | startin|g dash, |
|00001250| 61 74 20 6c 65 61 73 74 | 20 6f 6e 65 20 61 64 64 |at least| one add|
|00001260| 69 74 69 6f 6e 61 6c 20 | 63 68 61 72 61 63 74 65 |itional |characte|
|00001270| 72 0d 23 20 09 61 66 74 | 65 72 20 74 68 65 20 73 |r.# .aft|er the s|
|00001280| 74 61 72 74 69 6e 67 20 | 64 61 73 68 2e 0d 23 20 |tarting |dash..# |
|00001290| a5 20 49 66 20 79 6f 75 | 20 68 61 76 65 20 61 20 |. If you| have a |
|000012a0| 74 61 62 6c 65 20 6f 66 | 20 63 6f 6e 74 65 6e 74 |table of| content|
|000012b0| 73 20 69 6e 20 79 6f 75 | 72 20 64 6f 63 75 6d 65 |s in you|r docume|
|000012c0| 6e 74 2c 20 69 74 20 73 | 68 6f 75 6c 64 20 62 65 |nt, it s|hould be|
|000012d0| 20 70 72 65 63 65 64 65 | 64 20 77 69 74 68 0d 23 | precede|d with.#|
|000012e0| 20 09 74 68 65 20 63 68 | 61 70 74 65 72 20 74 69 | .the ch|apter ti|
|000012f0| 74 6c 65 20 22 43 4f 4e | 54 45 4e 54 53 22 20 28 |tle "CON|TENTS" (|
|00001300| 62 65 74 77 65 65 6e 20 | 64 61 73 68 2d 73 70 61 |between |dash-spa|
|00001310| 63 65 20 6c 69 6e 65 73 | 29 2e 20 54 68 65 20 65 |ce lines|). The e|
|00001320| 6e 74 69 72 65 20 74 61 | 62 6c 65 0d 23 20 09 6f |ntire ta|ble.# .o|
|00001330| 66 20 63 6f 6e 74 65 6e | 74 73 20 77 69 6c 6c 20 |f conten|ts will |
|00001340| 62 65 20 73 6b 69 70 70 | 65 64 2c 20 61 6e 64 20 |be skipp|ed, and |
|00001350| 72 65 67 65 6e 65 72 61 | 74 65 64 20 62 79 20 74 |regenera|ted by t|
|00001360| 68 69 73 20 70 72 6f 67 | 72 61 6d 2e 20 4e 6f 74 |his prog|ram. Not|
|00001370| 65 20 79 6f 75 72 0d 23 | 20 09 74 61 62 6c 65 20 |e your.#| .table |
|00001380| 6f 66 20 63 6f 6e 74 65 | 6e 74 73 20 73 68 6f 75 |of conte|nts shou|
|00001390| 6c 64 20 62 65 20 66 6f | 6c 6c 6f 77 65 64 20 62 |ld be fo|llowed b|
|000013a0| 79 20 61 20 63 68 61 70 | 74 65 72 20 74 69 74 6c |y a chap|ter titl|
|000013b0| 65 2c 20 73 69 6e 63 65 | 20 65 76 65 72 79 74 68 |e, since| everyth|
|000013c0| 69 6e 67 0d 23 20 09 66 | 72 6f 6d 20 74 68 65 20 |ing.# .f|rom the |
|000013d0| 22 43 4f 4e 54 45 4e 54 | 53 22 20 63 68 61 70 74 |"CONTENT|S" chapt|
|000013e0| 65 72 20 74 69 74 6c 65 | 20 74 6f 20 74 68 65 20 |er title| to the |
|000013f0| 6e 65 78 74 20 63 68 61 | 70 74 65 72 20 74 69 74 |next cha|pter tit|
|00001400| 6c 65 20 77 69 6c 6c 20 | 62 65 20 73 6b 69 70 70 |le will |be skipp|
|00001410| 65 64 2e 0d 23 20 a5 20 | 57 69 74 68 69 6e 20 65 |ed..# . |Within e|
|00001420| 61 63 68 20 63 68 61 70 | 74 65 72 2c 20 6d 61 6a |ach chap|ter, maj|
|00001430| 6f 72 20 73 75 62 68 65 | 61 64 69 6e 67 73 20 74 |or subhe|adings t|
|00001440| 68 61 74 20 73 68 6f 75 | 6c 64 20 62 65 20 69 6e |hat shou|ld be in|
|00001450| 63 6c 75 64 65 64 20 69 | 6e 20 74 68 65 20 6d 61 |cluded i|n the ma|
|00001460| 69 6e 0d 23 20 09 74 61 | 62 6c 65 20 6f 66 20 63 |in.# .ta|ble of c|
|00001470| 6f 6e 74 65 6e 74 73 20 | 73 68 6f 75 6c 64 20 62 |ontents |should b|
|00001480| 65 20 66 6f 72 6d 61 74 | 74 65 64 20 22 a4 5c 74 |e format|ted ".\t|
|00001490| 53 75 62 20 73 65 63 74 | 69 6f 6e 20 6e 61 6d 65 |Sub sect|ion name|
|000014a0| 22 2e 20 53 75 62 68 65 | 61 64 69 6e 67 73 0d 23 |". Subhe|adings.#|
|000014b0| 20 09 74 68 61 74 20 73 | 68 6f 75 6c 64 20 4e 4f | .that s|hould NO|
|000014c0| 54 20 62 65 20 73 68 6f | 77 6e 20 69 6e 20 74 68 |T be sho|wn in th|
|000014d0| 65 20 6d 61 69 6e 20 74 | 61 62 6c 65 20 6f 66 20 |e main t|able of |
|000014e0| 63 6f 6e 74 65 6e 74 73 | 20 62 75 74 20 53 48 4f |contents| but SHO|
|000014f0| 55 4c 44 20 62 65 20 73 | 68 6f 77 6e 0d 23 20 09 |ULD be s|hown.# .|
|00001500| 69 6e 20 74 68 65 20 74 | 61 62 6c 65 20 6f 66 20 |in the t|able of |
|00001510| 63 6f 6e 74 65 6e 74 73 | 20 66 6f 72 20 74 68 65 |contents| for the|
|00001520| 20 63 68 61 70 74 65 72 | 20 69 74 73 65 6c 66 20 | chapter| itself |
|00001530| 73 68 6f 75 6c 64 20 62 | 65 20 66 6f 72 6d 61 74 |should b|e format|
|00001540| 74 65 64 0d 23 20 09 22 | 28 a4 29 5c 74 53 75 62 |ted.# ."|(.)\tSub|
|00001550| 20 73 65 63 74 69 6f 6e | 20 6e 61 6d 65 22 2e 0d | section| name"..|
|00001560| 23 20 a5 20 53 75 62 68 | 65 61 64 69 6e 67 73 20 |# . Subh|eadings |
|00001570| 74 68 61 74 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 |that sho|uld not |
|00001580| 62 65 20 73 68 6f 77 6e | 20 69 6e 20 61 6e 79 20 |be shown| in any |
|00001590| 74 61 62 6c 65 20 6f 66 | 20 63 6f 6e 74 65 6e 74 |table of| content|
|000015a0| 73 20 73 68 6f 75 6c 64 | 20 74 61 6b 65 0d 23 20 |s should| take.# |
|000015b0| 09 74 68 65 20 66 6f 72 | 6d 20 22 3e 5c 74 53 75 |.the for|m ">\tSu|
|000015c0| 62 20 73 65 63 74 69 6f | 6e 20 6e 61 6d 65 22 2e |b sectio|n name".|
|000015d0| 0d 23 20 a5 20 41 6e 79 | 20 69 6c 6c 75 73 74 72 |.# . Any| illustr|
|000015e0| 61 74 69 6f 6e 73 20 28 | 50 49 43 54 29 20 6d 75 |ations (|PICT) mu|
|000015f0| 73 74 20 68 61 76 65 20 | 62 65 65 6e 20 69 6e 73 |st have |been ins|
|00001600| 65 72 74 65 64 20 75 73 | 69 6e 67 20 45 6e 74 65 |erted us|ing Ente|
|00001610| 72 41 63 74 2c 20 61 6e | 64 20 79 6f 75 20 6d 75 |rAct, an|d you mu|
|00001620| 73 74 0d 23 20 09 68 61 | 76 65 20 69 6e 73 65 72 |st.# .ha|ve inser|
|00001630| 74 65 64 20 6f 72 20 64 | 65 6c 65 74 65 64 20 61 |ted or d|eleted a|
|00001640| 74 20 6c 65 61 73 74 20 | 6f 6e 65 20 50 49 43 54 |t least |one PICT|
|00001650| 20 75 73 69 6e 67 20 76 | 33 2e 37 20 6f 72 20 6c | using v|3.7 or l|
|00001660| 61 74 65 72 20 6f 66 20 | 45 6e 74 65 72 41 63 74 |ater of |EnterAct|
|00001670| 2e 0d 23 20 a5 20 4d 61 | 6a 6f 72 20 6c 69 73 74 |..# . Ma|jor list|
|00001680| 73 20 62 65 67 69 6e 20 | 77 69 74 68 20 22 5c 74 |s begin |with "\t|
|00001690| a5 22 2e 20 53 75 62 6c | 69 73 74 73 20 62 65 67 |.". Subl|ists beg|
|000016a0| 69 6e 20 77 69 74 68 20 | 22 5c 74 5c 74 a5 22 2e |in with |"\t\t.".|
|000016b0| 20 54 68 65 72 65 20 73 | 68 6f 75 6c 64 20 62 65 | There s|hould be|
|000016c0| 20 6e 6f 0d 23 20 09 62 | 6c 61 6e 6b 20 6c 69 6e | no.# .b|lank lin|
|000016d0| 65 73 20 77 69 74 68 69 | 6e 20 61 20 6c 69 73 74 |es withi|n a list|
|000016e0| 2c 20 73 69 6e 63 65 20 | 61 20 62 6c 61 6e 6b 20 |, since |a blank |
|000016f0| 6c 69 6e 65 20 73 69 67 | 6e 61 6c 73 20 74 68 65 |line sig|nals the|
|00001700| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 6c 69 73 74 | end of |the list|
|00001710| 0d 23 20 09 28 69 6e 63 | 6c 75 64 69 6e 67 20 61 |.# .(inc|luding a|
|00001720| 6e 79 20 73 75 62 6c 69 | 73 74 73 29 2e 0d 23 20 |ny subli|sts)..# |
|00001730| a5 20 43 68 75 6e 6b 73 | 20 6f 66 20 74 65 78 74 |. Chunks| of text|
|00001740| 20 74 68 61 74 20 61 72 | 65 20 74 6f 20 62 65 20 | that ar|e to be |
|00001750| 71 75 6f 74 65 64 20 61 | 73 2d 69 73 20 77 69 74 |quoted a|s-is wit|
|00001760| 68 20 6e 6f 20 72 65 66 | 6f 72 6d 61 74 74 69 6e |h no ref|ormattin|
|00001770| 67 20 73 68 6f 75 6c 64 | 20 62 65 0d 23 20 09 62 |g should| be.# .b|
|00001780| 65 74 77 65 65 6e 20 6c | 69 6e 65 73 20 74 68 61 |etween l|ines tha|
|00001790| 74 20 63 6f 6e 73 69 73 | 74 20 6f 66 20 65 78 61 |t consis|t of exa|
|000017a0| 63 74 6c 79 20 66 6f 75 | 72 20 75 6e 64 65 72 73 |ctly fou|r unders|
|000017b0| 63 6f 72 65 73 20 22 5f | 5f 5f 5f 22 2e 0d 0d 23 |cores "_|___"...#|
|000017c0| 20 49 66 20 79 6f 75 20 | 77 69 73 68 20 74 6f 20 | If you |wish to |
|000017d0| 6d 6f 64 69 66 79 20 74 | 68 65 20 73 74 72 75 63 |modify t|he struc|
|000017e0| 74 75 72 65 20 74 68 61 | 74 20 74 68 69 73 20 70 |ture tha|t this p|
|000017f0| 72 6f 67 72 61 6d 20 75 | 73 65 73 2c 20 79 6f 75 |rogram u|ses, you|
|00001800| 27 6c 6c 20 6e 65 65 64 | 20 74 6f 20 63 68 61 6e |'ll need| to chan|
|00001810| 67 65 0d 23 20 74 68 65 | 20 66 75 6e 63 74 69 6f |ge.# the| functio|
|00001820| 6e 20 22 44 6f 54 68 65 | 4c 69 6e 65 73 28 29 22 |n "DoThe|Lines()"|
|00001830| 20 62 65 6c 6f 77 2e 20 | 4e 6f 74 65 20 74 68 61 | below. |Note tha|
|00001840| 74 20 73 74 72 75 63 74 | 75 72 69 6e 67 20 69 6e |t struct|uring in|
|00001850| 66 6f 72 6d 61 74 69 6f | 6e 20 69 73 20 65 78 70 |formatio|n is exp|
|00001860| 65 63 74 65 64 0d 23 20 | 74 6f 20 63 6f 6d 65 20 |ected.# |to come |
|00001870| 42 45 46 4f 52 45 20 74 | 68 65 20 74 65 78 74 20 |BEFORE t|he text |
|00001880| 74 6f 20 62 65 20 66 6f | 72 6d 61 74 74 65 64 20 |to be fo|rmatted |
|00001890| 28 69 6e 20 63 68 61 70 | 74 65 72 20 74 69 74 6c |(in chap|ter titl|
|000018a0| 65 20 74 68 65 20 64 61 | 73 68 2d 73 70 61 63 65 |e the da|sh-space|
|000018b0| 20 6c 69 6e 65 20 63 6f | 6d 65 73 0d 23 20 62 65 | line co|mes.# be|
|000018c0| 66 6f 72 65 20 61 6e 64 | 20 61 66 74 65 72 20 74 |fore and| after t|
|000018d0| 68 65 20 74 69 74 6c 65 | 2c 20 62 75 74 20 74 68 |he title|, but th|
|000018e0| 65 20 6f 6e 65 20 61 66 | 74 65 72 20 74 68 65 20 |e one af|ter the |
|000018f0| 74 69 74 6c 65 20 69 73 | 20 6a 75 73 74 20 66 6f |title is| just fo|
|00001900| 72 20 74 68 65 20 73 61 | 6b 65 20 6f 66 0d 23 20 |r the sa|ke of.# |
|00001910| 61 70 70 65 61 72 61 6e | 63 65 20 69 6e 20 74 68 |appearan|ce in th|
|00001920| 65 20 6e 6f 6e 2d 68 74 | 6d 6c 20 76 65 72 73 69 |e non-ht|ml versi|
|00001930| 6f 6e 29 2e 20 49 66 20 | 79 6f 75 20 77 61 6e 74 |on). If |you want|
|00001940| 20 61 6e 79 20 73 74 72 | 75 63 74 75 72 69 6e 67 | any str|ucturing|
|00001950| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 74 6f 0d | informa|tion to.|
|00001960| 23 20 63 6f 6d 65 20 41 | 46 54 45 52 20 74 68 65 |# come A|FTER the|
|00001970| 20 74 65 78 74 20 28 73 | 75 63 68 20 61 73 20 69 | text (s|uch as i|
|00001980| 6e 64 69 63 61 74 69 6e | 67 20 61 20 63 68 61 70 |ndicatin|g a chap|
|00001990| 74 65 72 20 74 69 74 6c | 65 20 62 79 20 6a 75 73 |ter titl|e by jus|
|000019a0| 74 20 61 20 64 61 73 68 | 2d 73 70 61 63 65 20 6c |t a dash|-space l|
|000019b0| 69 6e 65 0d 23 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |ine.# fo|llowing |
|000019c0| 74 68 65 20 74 69 74 6c | 65 2c 20 6e 6f 20 64 61 |the titl|e, no da|
|000019d0| 73 68 2d 73 70 61 63 65 | 20 6c 69 6e 65 20 62 65 |sh-space| line be|
|000019e0| 66 6f 72 65 20 69 74 29 | 20 74 68 65 6e 20 79 6f |fore it)| then yo|
|000019f0| 75 20 77 69 6c 6c 20 68 | 61 76 65 20 74 6f 20 62 |u will h|ave to b|
|00001a00| 75 66 66 65 72 0d 23 20 | 74 68 65 20 6c 69 6e 65 |uffer.# |the line|
|00001a10| 73 20 61 73 20 74 68 65 | 79 20 61 72 65 20 72 65 |s as the|y are re|
|00001a20| 61 64 20 69 6e 20 66 72 | 6f 6d 20 79 6f 75 72 20 |ad in fr|om your |
|00001a30| 64 6f 63 75 6d 65 6e 74 | 2c 20 73 69 6e 63 65 20 |document|, since |
|00001a40| 79 6f 75 20 77 6f 6e 27 | 74 20 6b 6e 6f 77 20 74 |you won'|t know t|
|00001a50| 68 61 74 0d 23 20 66 6f | 72 6d 61 74 74 69 6e 67 |hat.# fo|rmatting|
|00001a60| 20 69 73 20 72 65 71 75 | 69 72 65 64 20 75 6e 74 | is requ|ired unt|
|00001a70| 69 6c 20 79 6f 75 27 76 | 65 20 6c 6f 6f 6b 65 64 |il you'v|e looked|
|00001a80| 20 61 74 20 74 68 65 20 | 6c 69 6e 65 20 61 66 74 | at the |line aft|
|00001a90| 65 72 20 74 68 65 20 6f | 6e 65 20 74 68 61 74 20 |er the o|ne that |
|00001aa0| 6e 65 65 64 73 0d 23 20 | 74 6f 20 62 65 20 66 6f |needs.# |to be fo|
|00001ab0| 72 6d 61 74 74 65 64 2e | 0d 23 20 46 6f 72 20 73 |rmatted.|.# For s|
|00001ac0| 6f 6d 65 20 68 65 6c 70 | 20 68 61 6e 64 6c 69 6e |ome help| handlin|
|00001ad0| 67 20 74 68 69 73 2c 20 | 73 65 65 0d 23 20 c7 68 |g this, |see.# .h|
|00001ae0| 41 57 4b 20 55 73 65 72 | d5 73 20 4d 61 6e 75 61 |AWK User|.s Manua|
|00001af0| 6c c8 20 c7 52 20 20 32 | 20 20 20 42 65 79 6f 6e |l. .R 2| Beyon|
|00001b00| 64 20 69 6e 70 75 74 20 | 72 65 63 6f 72 64 73 c8 |d input |records.|
|00001b10| 0d 23 20 65 73 70 65 63 | 69 61 6c 6c 79 20 74 68 |.# espec|ially th|
|00001b20| 65 20 70 61 72 74 20 61 | 20 63 6f 75 70 6c 65 20 |e part a| couple |
|00001b30| 6f 66 20 70 61 67 65 73 | 20 69 6e 2c 20 61 62 6f |of pages| in, abo|
|00001b40| 75 74 20 22 45 6e 64 d0 | 62 75 66 66 65 72 65 64 |ut "End.|buffered|
|00001b50| 20 69 6e 70 75 74 22 2e | 0d 0d 23 20 54 4f 43 20 | input".|..# TOC |
|00001b60| 61 6e 64 20 61 6e 63 68 | 6f 72 20 68 61 6e 64 6c |and anch|or handl|
|00001b70| 69 6e 67 3a 0d 23 20 47 | 69 76 65 6e 20 22 4e 61 |ing:.# G|iven "Na|
|00001b80| 6d 65 20 6f 66 20 48 65 | 61 64 69 6e 67 22 20 61 |me of He|ading" a|
|00001b90| 6e 64 20 68 65 61 64 69 | 6e 67 20 6c 65 76 65 6c |nd headi|ng level|
|00001ba0| 20 48 32 20 6f 72 20 48 | 33 3a 0d 23 20 31 20 72 | H2 or H|3:.# 1 r|
|00001bb0| 65 70 6c 61 63 65 20 77 | 69 74 68 20 3c 48 6e 3e |eplace w|ith <Hn>|
|00001bc0| 3c 41 20 4e 41 4d 45 20 | 3d 20 22 4e 61 6d 65 20 |<A NAME |= "Name |
|00001bd0| 6f 66 20 48 65 61 64 69 | 6e 67 22 20 3e 4e 61 6d |of Headi|ng" >Nam|
|00001be0| 65 20 6f 66 20 48 65 61 | 64 69 6e 67 3c 2f 41 3e |e of Hea|ding</A>|
|00001bf0| 3c 2f 48 6e 3e 0d 23 20 | 32 20 69 66 20 48 32 20 |</Hn>.# |2 if H2 |
|00001c00| 68 65 61 64 2c 20 69 6e | 63 72 65 6d 65 6e 74 20 |head, in|crement |
|00001c10| 68 32 43 6f 75 6e 74 65 | 72 0d 23 20 33 20 61 63 |h2Counte|r.# 3 ac|
|00001c20| 63 75 6d 75 6c 61 74 65 | 20 68 65 61 64 69 6e 67 |cumulate| heading|
|00001c30| 73 20 69 6e 20 54 4f 43 | 5b 68 32 43 6f 75 6e 74 |s in TOC|[h2Count|
|00001c40| 65 72 5d 2c 20 77 69 74 | 68 20 53 55 42 53 45 50 |er], wit|h SUBSEP|
|00001c50| 20 69 6e 20 62 65 74 77 | 65 65 6e 0d 23 20 34 20 | in betw|een.# 4 |
|00001c60| 61 74 20 65 6e 64 20 73 | 70 6c 69 74 20 65 61 63 |at end s|plit eac|
|00001c70| 68 20 61 72 72 61 79 20 | 65 6e 74 72 79 2c 20 6f |h array |entry, o|
|00001c80| 75 74 70 75 74 20 55 52 | 4c 73 20 69 6e 20 75 6e |utput UR|Ls in un|
|00001c90| 6f 72 64 65 72 65 64 20 | 6c 69 73 74 73 20 66 6f |ordered |lists fo|
|00001ca0| 72 20 54 4f 43 2e 0d 0d | 42 45 47 49 4e 20 7b 0d |r TOC...|BEGIN {.|
|00001cb0| 09 49 6e 69 74 53 70 65 | 63 69 61 6c 43 68 61 72 |.InitSpe|cialChar|
|00001cc0| 61 63 74 65 72 73 28 29 | 3b 0d 09 23 20 52 65 6d |acters()|;..# Rem|
|00001cd0| 65 6d 62 65 72 20 66 75 | 6c 6c 20 6e 61 6d 65 20 |ember fu|ll name |
|00001ce0| 6f 66 20 6d 61 69 6e 20 | 64 6f 63 75 6d 65 6e 74 |of main |document|
|00001cf0| 2e 0d 09 69 6e 70 75 74 | 46 69 6c 65 20 3d 20 41 |...input|File = A|
|00001d00| 52 47 56 5b 31 5d 3b 0d | 09 23 20 47 65 74 20 74 |RGV[1];.|.# Get t|
|00001d10| 69 74 6c 65 20 61 6e 64 | 20 6d 61 69 6e 20 68 65 |itle and| main he|
|00001d20| 61 64 20 66 72 6f 6d 20 | 6e 61 6d 65 20 6f 66 20 |ad from |name of |
|00001d30| 64 6f 63 75 6d 65 6e 74 | 2e 0d 09 6e 20 3d 20 73 |document|...n = s|
|00001d40| 70 6c 69 74 28 69 6e 70 | 75 74 46 69 6c 65 2c 20 |plit(inp|utFile, |
|00001d50| 6e 61 6d 65 73 2c 20 22 | 3a 22 29 3b 0d 09 74 68 |names, "|:");..th|
|00001d60| 65 4d 61 69 6e 54 69 74 | 6c 65 20 3d 20 6e 61 6d |eMainTit|le = nam|
|00001d70| 65 73 5b 6e 5d 3b 0d 09 | 74 68 65 4d 61 69 6e 48 |es[n];..|theMainH|
|00001d80| 65 61 64 20 3d 20 6e 61 | 6d 65 73 5b 6e 5d 3b 0d |ead = na|mes[n];.|
|00001d90| 09 0d 09 63 6f 6e 74 65 | 6e 74 73 4d 61 72 6b 65 |...conte|ntsMarke|
|00001da0| 72 20 3d 20 22 54 4f 43 | 20 47 4f 45 53 20 48 45 |r = "TOC| GOES HE|
|00001db0| 52 45 22 3b 0d 09 0d 09 | 69 6e 4c 69 73 74 20 3d |RE";....|inList =|
|00001dc0| 20 30 3b 0d 09 6c 69 73 | 74 45 6c 65 6d 65 6e 74 | 0;..lis|tElement|
|00001dd0| 20 3d 20 30 3b 0d 09 68 | 32 43 6f 75 6e 74 65 72 | = 0;..h|2Counter|
|00001de0| 20 3d 20 30 3b 0d 09 6e | 65 77 50 61 72 61 67 72 | = 0;..n|ewParagr|
|00001df0| 61 70 68 43 6f 6d 69 6e | 67 20 3d 20 31 3b 0d 09 |aphComin|g = 1;..|
|00001e00| 0d 09 63 75 72 72 65 6e | 74 47 49 46 20 3d 20 30 |..curren|tGIF = 0|
|00001e10| 3b 0d 09 6e 75 6d 47 49 | 46 73 20 3d 20 30 3b 0d |;..numGI|Fs = 0;.|
|00001e20| 09 64 6f 69 6e 67 47 49 | 46 20 3d 20 30 3b 0d 09 |.doingGI|F = 0;..|
|00001e30| 64 6f 69 6e 67 41 73 49 | 73 20 3d 20 30 3b 0d 09 |doingAsI|s = 0;..|
|00001e40| 0d 09 23 20 22 67 69 66 | 4c 69 73 74 22 2c 20 66 |..# "gif|List", f|
|00001e50| 75 6c 6c 20 70 61 74 68 | 20 74 6f 20 55 6e 73 6f |ull path| to Unso|
|00001e60| 72 74 65 64 20 67 69 66 | 20 6c 69 73 74 2c 20 73 |rted gif| list, s|
|00001e70| 68 6f 75 6c 64 20 62 65 | 20 70 72 65 73 65 74 0d |hould be| preset.|
|00001e80| 09 23 20 69 6e 20 64 69 | 61 6c 6f 67 20 6f 72 20 |.# in di|alog or |
|00001e90| 6f 6e 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 6c |on the c|ommand l|
|00001ea0| 69 6e 65 2e 0d 09 67 69 | 66 41 72 72 61 79 46 69 |ine...gi|fArrayFi|
|00001eb0| 6c 65 20 3d 20 67 69 66 | 4c 69 73 74 3b 0d 09 0d |le = gif|List;...|
|00001ec0| 09 67 69 66 50 61 72 74 | 69 61 6c 4c 6f 63 61 74 |.gifPart|ialLocat|
|00001ed0| 69 6f 6e 20 3d 20 22 2e | 2e 2f 47 72 61 70 68 69 |ion = ".|./Graphi|
|00001ee0| 63 73 2f 22 3b 20 23 23 | 73 65 65 20 6a 75 73 74 |cs/"; ##|see just|
|00001ef0| 20 62 65 6c 6f 77 0d 09 | 6f 75 74 46 69 6c 65 20 | below..|outFile |
|00001f00| 3d 20 22 22 0d 09 63 6f | 6e 74 65 6e 74 73 46 69 |= ""..co|ntentsFi|
|00001f10| 6c 65 4e 61 6d 65 20 3d | 20 22 43 6f 6e 74 65 6e |leName =| "Conten|
|00001f20| 74 73 2e 68 74 6d 6c 22 | 3b 0d 09 0d 09 6e 20 3d |ts.html"|;....n =|
|00001f30| 20 73 70 6c 69 74 28 67 | 69 66 41 72 72 61 79 46 | split(g|ifArrayF|
|00001f40| 69 6c 65 2c 20 6e 61 6d | 65 73 2c 20 22 3a 22 29 |ile, nam|es, ":")|
|00001f50| 3b 0d 09 66 6f 72 20 28 | 69 20 3d 20 31 3b 20 69 |;..for (|i = 1; i|
|00001f60| 20 3c 20 6e 20 2d 20 31 | 3b 20 2b 2b 69 29 0d 09 | < n - 1|; ++i)..|
|00001f70| 09 7b 0d 09 09 63 68 61 | 70 74 65 72 73 46 6f 6c |.{...cha|ptersFol|
|00001f80| 64 65 72 20 3d 20 63 68 | 61 70 74 65 72 73 46 6f |der = ch|aptersFo|
|00001f90| 6c 64 65 72 20 6e 61 6d | 65 73 5b 69 5d 20 22 3a |lder nam|es[i] ":|
|00001fa0| 22 3b 0d 09 09 7d 0d 09 | 0d 09 0d 09 67 72 61 70 |";...}..|....grap|
|00001fb0| 68 69 63 73 46 6f 6c 64 | 65 72 4e 61 6d 65 20 3d |hicsFold|erName =|
|00001fc0| 20 6e 61 6d 65 73 5b 69 | 5d 3b 0d 09 67 69 66 50 | names[i|];..gifP|
|00001fd0| 61 72 74 69 61 6c 4c 6f | 63 61 74 69 6f 6e 20 3d |artialLo|cation =|
|00001fe0| 20 22 2e 2e 2f 22 20 67 | 72 61 70 68 69 63 73 46 | "../" g|raphicsF|
|00001ff0| 6f 6c 64 65 72 4e 61 6d | 65 20 22 2f 22 3b 20 23 |olderNam|e "/"; #|
|00002000| 20 65 67 20 22 2e 2e 2f | 47 72 61 70 68 69 63 73 | eg "../|Graphics|
|00002010| 2f 22 0d 09 0d 09 63 6f | 6e 74 65 6e 74 73 46 69 |/"....co|ntentsFi|
|00002020| 6c 65 4c 6f 63 61 74 69 | 6f 6e 20 3d 20 63 68 61 |leLocati|on = cha|
|00002030| 70 74 65 72 73 46 6f 6c | 64 65 72 3b 0d 09 63 68 |ptersFol|der;..ch|
|00002040| 61 70 74 65 72 73 46 6f | 6c 64 65 72 20 3d 20 63 |aptersFo|lder = c|
|00002050| 68 61 70 74 65 72 73 46 | 6f 6c 64 65 72 20 22 54 |haptersF|older "T|
|00002060| 65 78 74 3a 22 3b 0d 09 | 23 23 20 65 67 20 63 68 |ext:";..|## eg ch|
|00002070| 61 70 74 65 72 73 46 6f | 6c 64 65 72 20 3d 20 53 |aptersFo|lder = S|
|00002080| 54 44 50 41 54 48 20 22 | 45 33 4d 5f 48 54 4d 4c |TDPATH "|E3M_HTML|
|00002090| 3a 54 65 78 74 3a 22 0d | 09 0d 09 4d 61 6b 65 46 |:Text:".|...MakeF|
|000020a0| 6f 6c 64 65 72 28 63 68 | 61 70 74 65 72 73 46 6f |older(ch|aptersFo|
|000020b0| 6c 64 65 72 29 3b 0d 09 | 0d 09 4c 6f 61 64 47 49 |lder);..|..LoadGI|
|000020c0| 46 4e 61 6d 65 73 28 29 | 3b 0d 09 0d 09 23 20 54 |FNames()|;....# T|
|000020d0| 68 65 20 6d 61 69 6e 20 | 65 76 65 6e 74 3a 20 69 |he main |event: i|
|000020e0| 6e 68 61 6c 65 20 61 6c | 6c 20 74 68 65 20 6c 69 |nhale al|l the li|
|000020f0| 6e 65 73 2c 20 77 72 69 | 74 65 20 74 68 65 20 63 |nes, wri|te the c|
|00002100| 68 61 70 74 65 72 73 2c | 20 77 72 69 74 65 20 6d |hapters,| write m|
|00002110| 61 69 6e 20 63 6f 6e 74 | 65 6e 74 73 2e 0d 09 44 |ain cont|ents...D|
|00002120| 6f 54 68 65 4c 69 6e 65 | 73 28 29 3b 0d 09 57 72 |oTheLine|s();..Wr|
|00002130| 69 74 65 4d 61 69 6e 43 | 6f 6e 74 65 6e 74 73 46 |iteMainC|ontentsF|
|00002140| 69 6c 65 28 29 3b 0d 09 | 0d 09 23 20 4e 6f 74 69 |ile();..|..# Noti|
|00002150| 66 79 20 77 65 27 72 65 | 20 64 6f 6e 65 2e 0d 09 |fy we're| done...|
|00002160| 70 72 69 6e 74 20 22 48 | 54 4d 4c 20 63 6f 6e 76 |print "H|TML conv|
|00002170| 65 72 73 69 6f 6e 20 6f | 66 22 2c 20 74 68 65 4d |ersion o|f", theM|
|00002180| 61 69 6e 54 69 74 6c 65 | 2c 20 22 63 6f 6d 70 6c |ainTitle|, "compl|
|00002190| 65 74 65 2e 22 3b 0d 09 | 7d 0d 0d 66 75 6e 63 74 |ete.";..|}..funct|
|000021a0| 69 6f 6e 20 49 6e 69 74 | 53 70 65 63 69 61 6c 43 |ion Init|SpecialC|
|000021b0| 68 61 72 61 63 74 65 72 | 73 28 29 0d 09 7b 0d 09 |haracter|s()..{..|
|000021c0| 61 6d 70 65 72 73 61 6e | 64 20 3d 20 22 5c 5c 26 |ampersan|d = "\\&|
|000021d0| 61 6d 70 3b 22 3b 0d 09 | 6c 65 73 73 54 68 61 6e |amp;";..|lessThan|
|000021e0| 20 3d 20 22 5c 5c 26 6c | 74 3b 22 3b 0d 09 67 72 | = "\\&l|t;";..gr|
|000021f0| 65 61 74 65 72 54 68 61 | 6e 20 3d 20 22 5c 5c 26 |eaterTha|n = "\\&|
|00002200| 67 74 3b 22 3b 0d 09 71 | 75 6f 74 65 20 3d 20 22 |gt;";..q|uote = "|
|00002210| 5c 5c 26 71 75 6f 74 3b | 22 3b 0d 09 65 75 72 6f |\\&quot;|";..euro|
|00002220| 4c 65 66 74 20 3d 20 22 | 5c 5c 26 23 31 37 31 3b |Left = "|\\&#171;|
|00002230| 22 3b 0d 09 65 75 72 6f | 52 69 67 68 74 20 3d 20 |";..euro|Right = |
|00002240| 22 5c 5c 26 23 31 38 37 | 3b 22 3b 0d 09 62 75 6c |"\\&#187|;";..bul|
|00002250| 6c 65 74 20 3d 20 22 5c | 5c 26 23 31 38 33 3b 22 |let = "\|\&#183;"|
|00002260| 3b 0d 09 64 6f 72 6e 6b | 20 3d 20 22 5c 5c 26 23 |;..dornk| = "\\&#|
|00002270| 31 37 32 3b 22 3b 0d 09 | 73 65 63 74 69 6f 6e 20 |172;";..|section |
|00002280| 3d 20 22 5c 5c 26 23 31 | 36 37 3b 22 3b 0d 09 70 |= "\\&#1|67;";..p|
|00002290| 61 72 61 20 3d 20 22 5c | 5c 26 23 31 38 32 3b 22 |ara = "\|\&#182;"|
|000022a0| 3b 0d 09 63 65 64 69 6c | 6c 61 43 20 3d 20 22 5c |;..cedil|laC = "\|
|000022b0| 5c 26 23 32 33 31 3b 22 | 3b 0d 09 73 68 79 20 3d |\&#231;"|;..shy =|
|000022c0| 20 22 5c 5c 26 23 31 37 | 33 3b 22 3b 0d 09 63 6f | "\\&#17|3;";..co|
|000022d0| 70 79 72 69 67 68 74 20 | 3d 20 22 5c 5c 26 23 31 |pyright |= "\\&#1|
|000022e0| 36 39 3b 22 3b 0d 09 72 | 65 67 69 73 74 72 61 74 |69;";..r|egistrat|
|000022f0| 69 6f 6e 20 3d 20 22 5c | 5c 26 23 31 37 34 3b 22 |ion = "\|\&#174;"|
|00002300| 3b 0d 09 71 75 65 73 74 | 69 6f 6e 20 3d 20 22 5c |;..quest|ion = "\|
|00002310| 5c 26 23 36 33 3b 22 3b | 0d 09 7d 0d 0d 23 20 64 |\&#63;";|..}..# d|
|00002320| 6f 20 66 6f 72 20 61 6c | 6c 20 69 6e 70 75 74 20 |o for al|l input |
|00002330| 6c 69 6e 65 73 0d 66 75 | 6e 63 74 69 6f 6e 20 44 |lines.fu|nction D|
|00002340| 6f 54 68 65 4c 69 6e 65 | 73 28 29 0d 09 7b 0d 09 |oTheLine|s()..{..|
|00002350| 67 65 74 6c 69 6e 65 20 | 3c 20 69 6e 70 75 74 46 |getline |< inputF|
|00002360| 69 6c 65 3b 20 23 20 73 | 6b 69 70 20 74 68 65 20 |ile; # s|kip the |
|00002370| 66 69 72 73 74 20 6c 69 | 6e 65 0d 09 77 68 69 6c |first li|ne..whil|
|00002380| 65 20 28 28 67 65 74 6c | 69 6e 65 20 3c 20 69 6e |e ((getl|ine < in|
|00002390| 70 75 74 46 69 6c 65 29 | 20 3e 20 30 29 0d 09 09 |putFile)| > 0)...|
|000023a0| 7b 0d 09 09 23 20 53 74 | 6f 70 20 73 6b 69 70 70 |{...# St|op skipp|
|000023b0| 69 6e 67 20 62 6c 61 6e | 6b 20 6c 69 6e 65 73 20 |ing blan|k lines |
|000023c0| 69 66 20 77 65 20 77 65 | 72 65 20 64 6f 69 6e 67 |if we we|re doing|
|000023d0| 20 61 20 47 49 46 20 61 | 6e 64 20 68 69 74 20 6e | a GIF a|nd hit n|
|000023e0| 6f 6e 62 6c 61 6e 6b 0d | 09 09 69 66 20 28 24 30 |onblank.|..if ($0|
|000023f0| 20 21 3d 20 22 22 29 0d | 09 09 09 64 6f 69 6e 67 | != "").|...doing|
|00002400| 47 49 46 20 3d 20 30 3b | 0d 09 09 0d 09 09 23 20 |GIF = 0;|......# |
|00002410| 22 41 73 20 69 73 22 20 | 73 65 63 74 69 6f 6e 73 |"As is" |sections|
|00002420| 20 73 68 6f 75 6c 64 6e | 27 74 20 63 6f 6e 74 61 | shouldn|'t conta|
|00002430| 69 6e 20 61 6e 79 20 6f | 74 68 65 72 20 22 73 74 |in any o|ther "st|
|00002440| 72 75 63 74 75 72 65 22 | 0d 09 09 69 66 20 28 24 |ructure"|...if ($|
|00002450| 30 20 7e 20 2f 5e 5b 20 | 5c 74 5d 2a 5f 5f 5f 5f |0 ~ /^[ |\t]*____|
|00002460| 5b 20 5c 74 5d 2a 24 2f | 29 0d 09 09 09 7b 0d 09 |[ \t]*$/|)....{..|
|00002470| 09 09 64 6f 6e 65 46 69 | 72 73 74 50 52 45 4c 69 |..doneFi|rstPRELi|
|00002480| 6e 65 20 3d 20 30 3b 0d | 09 09 09 77 68 69 6c 65 |ne = 0;.|...while|
|00002490| 20 28 28 67 65 74 6c 69 | 6e 65 20 3c 20 69 6e 70 | ((getli|ne < inp|
|000024a0| 75 74 46 69 6c 65 29 20 | 3e 20 30 29 0d 09 09 09 |utFile) |> 0)....|
|000024b0| 09 7b 0d 09 09 09 09 69 | 66 20 28 24 30 20 7e 20 |.{.....i|f ($0 ~ |
|000024c0| 2f 5e 5b 20 5c 74 5d 2a | 5f 5f 5f 5f 5b 20 5c 74 |/^[ \t]*|____[ \t|
|000024d0| 5d 2a 24 2f 29 0d 09 09 | 09 09 09 7b 0d 09 09 09 |]*$/)...|...{....|
|000024e0| 09 09 69 66 20 28 64 6f | 6e 65 46 69 72 73 74 50 |..if (do|neFirstP|
|000024f0| 52 45 4c 69 6e 65 20 3d | 3d 20 31 29 0d 09 09 09 |RELine =|= 1)....|
|00002500| 09 09 09 50 72 69 6e 74 | 54 6f 4f 75 74 46 69 6c |...Print|ToOutFil|
|00002510| 65 28 22 3c 2f 50 52 45 | 3e 22 29 3b 0d 09 09 09 |e("</PRE|>");....|
|00002520| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 09 7d 0d |..break;|......}.|
|00002530| 09 09 09 09 65 6c 73 65 | 0d 09 09 09 09 09 7b 0d |....else|......{.|
|00002540| 09 09 09 09 09 52 65 70 | 6c 61 63 65 53 70 65 63 |.....Rep|laceSpec|
|00002550| 69 61 6c 43 68 61 72 61 | 63 74 65 72 73 28 29 3b |ialChara|cters();|
|00002560| 0d 09 09 09 09 09 69 66 | 20 28 64 6f 6e 65 46 69 |......if| (doneFi|
|00002570| 72 73 74 50 52 45 4c 69 | 6e 65 20 3d 3d 20 31 29 |rstPRELi|ne == 1)|
|00002580| 0d 09 09 09 09 09 09 50 | 72 69 6e 74 54 6f 4f 75 |.......P|rintToOu|
|00002590| 74 46 69 6c 65 28 24 30 | 29 3b 0d 09 09 09 09 09 |tFile($0|);......|
|000025a0| 65 6c 73 65 0d 09 09 09 | 09 09 09 7b 0d 09 09 09 |else....|...{....|
|000025b0| 09 09 09 50 72 69 6e 74 | 54 6f 4f 75 74 46 69 6c |...Print|ToOutFil|
|000025c0| 65 28 22 3c 50 52 45 3e | 22 20 24 30 29 3b 0d 09 |e("<PRE>|" $0);..|
|000025d0| 09 09 09 09 09 64 6f 6e | 65 46 69 72 73 74 50 52 |.....don|eFirstPR|
|000025e0| 45 4c 69 6e 65 20 3d 20 | 31 3b 0d 09 09 09 09 09 |ELine = |1;......|
|000025f0| 09 7d 0d 09 09 09 09 09 | 7d 0d 09 09 09 09 7d 0d |.}......|}.....}.|
|00002600| 09 09 09 7d 0d 09 09 23 | 20 52 65 6d 65 6d 62 65 |...}...#| Remembe|
|00002610| 72 20 69 66 20 6c 69 73 | 74 20 65 6c 65 6d 65 6e |r if lis|t elemen|
|00002620| 74 20 73 74 61 72 74 69 | 6e 67 20 28 6f 6e 65 20 |t starti|ng (one |
|00002630| 6f 72 20 74 77 6f 20 74 | 61 62 73 2c 20 62 75 6c |or two t|abs, bul|
|00002640| 6c 65 74 29 0d 09 09 65 | 6c 73 65 20 69 66 20 28 |let)...e|lse if (|
|00002650| 24 30 20 7e 20 2f 5e 5b | 5c 74 5d 2b a5 2f 29 0d |$0 ~ /^[|\t]+./).|
|00002660| 09 09 09 7b 0d 09 09 09 | 69 66 20 28 24 30 20 7e |...{....|if ($0 ~|
|00002670| 20 2f 5e 5c 74 a5 2f 29 | 0d 09 09 09 09 7b 0d 09 | /^\t./)|.....{..|
|00002680| 09 09 09 23 20 57 65 20 | 6d 61 79 20 62 65 20 73 |...# We |may be s|
|00002690| 74 61 72 74 69 6e 67 20 | 61 20 62 72 61 6e 64 20 |tarting |a brand |
|000026a0| 6e 65 77 20 6c 69 73 74 | 0d 09 09 09 09 69 66 20 |new list|.....if |
|000026b0| 28 69 6e 4c 69 73 74 20 | 3d 3d 20 30 29 0d 09 09 |(inList |== 0)...|
|000026c0| 09 09 09 7b 0d 09 09 09 | 09 09 50 72 69 6e 74 54 |...{....|..PrintT|
|000026d0| 6f 4f 75 74 46 69 6c 65 | 28 22 3c 55 4c 3e 22 29 |oOutFile|("<UL>")|
|000026e0| 3b 0d 09 09 09 09 09 69 | 6e 4c 69 73 74 20 3d 20 |;......i|nList = |
|000026f0| 31 3b 0d 09 09 09 09 09 | 7d 0d 09 09 09 09 65 6c |1;......|}.....el|
|00002700| 73 65 0d 09 09 09 09 09 | 7b 0d 09 09 09 09 09 23 |se......|{......#|
|00002710| 20 41 20 6e 65 77 20 6c | 69 73 74 20 65 6c 65 6d | A new l|ist elem|
|00002720| 65 6e 74 20 65 6e 64 73 | 20 61 6e 79 20 73 75 62 |ent ends| any sub|
|00002730| 65 6c 65 6d 65 6e 74 0d | 09 09 09 09 09 69 66 20 |element.|.....if |
|00002740| 28 73 75 62 4c 69 73 74 | 45 6c 65 6d 65 6e 74 20 |(subList|Element |
|00002750| 3d 3d 20 31 29 0d 09 09 | 09 09 09 09 7b 0d 09 09 |== 1)...|....{...|
|00002760| 09 09 09 09 50 72 69 6e | 74 54 6f 4f 75 74 46 69 |....Prin|tToOutFi|
|00002770| 6c 65 28 22 5c 74 3c 2f | 55 4c 3e 22 29 3b 0d 09 |le("\t</|UL>");..|
|00002780| 09 09 09 09 09 73 75 62 | 4c 69 73 74 45 6c 65 6d |.....sub|ListElem|
|00002790| 65 6e 74 20 3d 20 30 3b | 0d 09 09 09 09 09 09 7d |ent = 0;|.......}|
|000027a0| 0d 09 09 09 09 09 7d 0d | 09 09 09 09 6c 69 73 74 |......}.|....list|
|000027b0| 45 6c 65 6d 65 6e 74 20 | 3d 20 31 3b 0d 09 09 09 |Element |= 1;....|
|000027c0| 09 23 20 50 72 69 6e 74 | 20 74 68 65 20 66 69 72 |.# Print| the fir|
|000027d0| 73 74 20 6c 69 6e 65 20 | 6f 66 20 74 68 65 20 6e |st line |of the n|
|000027e0| 65 77 20 6c 69 73 74 20 | 65 6c 65 6d 65 6e 74 0d |ew list |element.|
|000027f0| 09 09 09 09 73 75 62 28 | 2f 5e 5b 5c 74 5d 2b a5 |....sub(|/^[\t]+.|
|00002800| 5b 20 5c 74 5d 2a 2f 2c | 20 22 22 29 3b 0d 09 09 |[ \t]*/,| "");...|
|00002810| 09 09 52 65 70 6c 61 63 | 65 53 70 65 63 69 61 6c |..Replac|eSpecial|
|00002820| 43 68 61 72 61 63 74 65 | 72 73 28 29 3b 0d 09 09 |Characte|rs();...|
|00002830| 09 09 50 72 69 6e 74 54 | 6f 4f 75 74 46 69 6c 65 |..PrintT|oOutFile|
|00002840| 28 22 3c 4c 49 3e 22 20 | 24 30 29 3b 0d 09 09 09 |("<LI>" |$0);....|
|00002850| 09 7d 0d 09 09 09 65 6c | 73 65 20 69 66 20 28 24 |.}....el|se if ($|
|00002860| 30 20 7e 20 2f 5e 5c 74 | 5c 74 a5 2f 29 0d 09 09 |0 ~ /^\t|\t./)...|
|00002870| 09 09 7b 0d 09 09 09 09 | 23 20 46 69 72 73 74 20 |..{.....|# First |
|00002880| 73 75 62 65 6c 65 6d 65 | 6e 74 2c 20 73 74 61 72 |subeleme|nt, star|
|00002890| 74 20 61 20 6e 65 77 20 | 6c 69 73 74 0d 09 09 09 |t a new |list....|
|000028a0| 09 69 66 20 28 73 75 62 | 4c 69 73 74 45 6c 65 6d |.if (sub|ListElem|
|000028b0| 65 6e 74 20 3d 3d 20 30 | 29 0d 09 09 09 09 09 7b |ent == 0|)......{|
|000028c0| 0d 09 09 09 09 09 50 72 | 69 6e 74 54 6f 4f 75 74 |......Pr|intToOut|
|000028d0| 46 69 6c 65 28 22 5c 74 | 3c 55 4c 3e 22 29 3b 0d |File("\t|<UL>");.|
|000028e0| 09 09 09 09 09 7d 0d 09 | 09 09 09 73 75 62 4c 69 |.....}..|...subLi|
|000028f0| 73 74 45 6c 65 6d 65 6e | 74 20 3d 20 31 3b 0d 09 |stElemen|t = 1;..|
|00002900| 09 09 09 23 20 50 72 69 | 6e 74 20 74 68 65 20 66 |...# Pri|nt the f|
|00002910| 69 72 73 74 20 6c 69 6e | 65 20 6f 66 20 74 68 65 |irst lin|e of the|
|00002920| 20 6e 65 77 20 6c 69 73 | 74 20 73 75 62 65 6c 65 | new lis|t subele|
|00002930| 6d 65 6e 74 0d 09 09 09 | 09 73 75 62 28 2f 5e 5b |ment....|.sub(/^[|
|00002940| 5c 74 5d 2b a5 5b 20 5c | 74 5d 2a 2f 2c 20 22 22 |\t]+.[ \|t]*/, ""|
|00002950| 29 3b 0d 09 09 09 09 52 | 65 70 6c 61 63 65 53 70 |);.....R|eplaceSp|
|00002960| 65 63 69 61 6c 43 68 61 | 72 61 63 74 65 72 73 28 |ecialCha|racters(|
|00002970| 29 3b 0d 09 09 09 09 50 | 72 69 6e 74 54 6f 4f 75 |);.....P|rintToOu|
|00002980| 74 46 69 6c 65 28 22 5c | 74 3c 4c 49 3e 22 20 24 |tFile("\|t<LI>" $|
|00002990| 30 29 3b 0d 09 09 09 09 | 7d 0d 09 09 09 7d 0d 09 |0);.....|}....}..|
|000029a0| 09 23 20 41 20 6c 69 73 | 74 20 66 69 6e 69 73 68 |.# A lis|t finish|
|000029b0| 65 73 20 77 69 74 68 20 | 61 20 62 6c 61 6e 6b 20 |es with |a blank |
|000029c0| 6c 69 6e 65 20 28 61 6c | 73 6f 20 73 69 67 6e 61 |line (al|so signa|
|000029d0| 6c 73 20 6e 65 77 20 70 | 61 72 61 67 72 61 70 68 |ls new p|aragraph|
|000029e0| 29 0d 09 09 65 6c 73 65 | 20 69 66 20 28 24 30 20 |)...else| if ($0 |
|000029f0| 3d 3d 20 22 22 29 0d 09 | 09 09 7b 0d 09 09 09 69 |== "")..|..{....i|
|00002a00| 66 20 28 69 6e 4c 69 73 | 74 29 0d 09 09 09 09 7b |f (inLis|t).....{|
|00002a10| 0d 09 09 09 09 69 66 20 | 28 73 75 62 4c 69 73 74 |.....if |(subList|
|00002a20| 45 6c 65 6d 65 6e 74 20 | 3d 3d 20 31 29 0d 09 09 |Element |== 1)...|
|00002a30| 09 09 09 50 72 69 6e 74 | 54 6f 4f 75 74 46 69 6c |...Print|ToOutFil|
|00002a40| 65 28 22 5c 74 3c 2f 55 | 4c 3e 22 29 3b 0d 09 09 |e("\t</U|L>");...|
|00002a50| 09 09 69 66 20 28 6c 69 | 73 74 45 6c 65 6d 65 6e |..if (li|stElemen|
|00002a60| 74 20 3d 3d 20 31 29 0d | 09 09 09 09 09 50 72 69 |t == 1).|.....Pri|
|00002a70| 6e 74 54 6f 4f 75 74 46 | 69 6c 65 28 22 3c 2f 55 |ntToOutF|ile("</U|
|00002a80| 4c 3e 22 29 3b 0d 09 09 | 09 09 69 6e 4c 69 73 74 |L>");...|..inList|
|00002a90| 20 3d 20 30 3b 0d 09 09 | 09 09 6c 69 73 74 45 6c | = 0;...|..listEl|
|00002aa0| 65 6d 65 6e 74 20 3d 20 | 30 3b 0d 09 09 09 09 73 |ement = |0;.....s|
|00002ab0| 75 62 4c 69 73 74 45 6c | 65 6d 65 6e 74 20 3d 20 |ubListEl|ement = |
|00002ac0| 30 3b 0d 09 09 09 09 7d | 0d 09 09 09 23 20 50 72 |0;.....}|....# Pr|
|00002ad0| 69 6e 74 20 62 6c 61 6e | 6b 20 6c 69 6e 65 73 2c |int blan|k lines,|
|00002ae0| 20 75 6e 6c 65 73 73 20 | 77 65 27 72 65 20 73 6b | unless |we're sk|
|00002af0| 69 70 70 69 6e 67 20 47 | 49 46 20 73 70 61 63 65 |ipping G|IF space|
|00002b00| 0d 09 09 09 69 66 20 28 | 64 6f 69 6e 67 47 49 46 |....if (|doingGIF|
|00002b10| 20 3d 3d 20 30 29 0d 09 | 09 09 09 50 72 69 6e 74 | == 0)..|...Print|
|00002b20| 54 6f 4f 75 74 46 69 6c | 65 28 22 22 29 3b 0d 09 |ToOutFil|e("");..|
|00002b30| 09 09 6e 65 77 50 61 72 | 61 67 72 61 70 68 43 6f |..newPar|agraphCo|
|00002b40| 6d 69 6e 67 20 3d 20 31 | 3b 0d 09 09 09 7d 0d 09 |ming = 1|;....}..|
|00002b50| 09 23 20 54 6f 70 20 6c | 65 76 65 6c 20 68 65 61 |.# Top l|evel hea|
|00002b60| 64 69 6e 67 20 48 32 2c | 20 62 65 74 77 65 65 6e |ding H2,| between|
|00002b70| 20 64 61 73 68 65 64 20 | 6c 69 6e 65 73 0d 09 09 | dashed |lines...|
|00002b80| 23 20 54 68 69 73 20 68 | 65 61 64 69 6e 67 20 73 |# This h|eading s|
|00002b90| 74 61 72 74 73 20 61 20 | 6e 65 77 20 66 69 6c 65 |tarts a |new file|
|00002ba0| 0d 09 09 65 6c 73 65 20 | 69 66 20 28 24 30 20 7e |...else |if ($0 ~|
|00002bb0| 20 2f 5e 2d 5b 20 5c 74 | 2d 5d 2b 24 2f 29 0d 09 | /^-[ \t|-]+$/)..|
|00002bc0| 09 09 7b 0d 09 09 09 67 | 65 74 6c 69 6e 65 20 3c |..{....g|etline <|
|00002bd0| 20 69 6e 70 75 74 46 69 | 6c 65 3b 0d 09 09 09 23 | inputFi|le;....#|
|00002be0| 20 53 6b 69 70 20 74 68 | 65 20 22 43 4f 4e 54 45 | Skip th|e "CONTE|
|00002bf0| 4e 54 53 22 20 73 65 63 | 74 69 6f 6e 0d 09 09 09 |NTS" sec|tion....|
|00002c00| 53 6b 69 70 55 6e 77 61 | 6e 74 65 64 53 65 63 74 |SkipUnwa|ntedSect|
|00002c10| 69 6f 6e 73 28 29 3b 0d | 09 09 09 23 20 68 61 76 |ions();.|...# hav|
|00002c20| 69 6e 67 20 74 72 6f 75 | 62 6c 65 20 77 69 74 68 |ing trou|ble with|
|00002c30| 20 71 75 6f 74 65 73 20 | 69 6e 20 63 68 61 70 74 | quotes |in chapt|
|00002c40| 65 72 20 74 69 74 6c 65 | 73 0d 09 09 09 53 69 6d |er title|s....Sim|
|00002c50| 70 6c 69 66 79 51 75 6f | 74 65 73 28 29 3b 0d 09 |plifyQuo|tes();..|
|00002c60| 09 09 52 65 70 6c 61 63 | 65 53 70 65 63 69 61 6c |..Replac|eSpecial|
|00002c70| 43 68 61 72 61 63 74 65 | 72 73 28 29 3b 0d 09 09 |Characte|rs();...|
|00002c80| 09 23 20 6d 61 6b 65 20 | 73 75 72 65 20 77 65 20 |.# make |sure we |
|00002c90| 63 61 6e 20 75 73 65 20 | 74 65 78 74 20 61 73 20 |can use |text as |
|00002ca0| 61 20 66 69 6c 65 20 6e | 61 6d 65 0d 09 09 09 67 |a file n|ame....g|
|00002cb0| 73 75 62 28 2f 5c 74 2f | 2c 20 22 20 22 29 3b 0d |sub(/\t/|, " ");.|
|00002cc0| 09 09 09 67 73 75 62 28 | 2f 3a 2f 2c 20 22 20 22 |...gsub(|/:/, " "|
|00002cd0| 29 3b 0d 09 09 09 53 74 | 61 72 74 4e 65 77 43 68 |);....St|artNewCh|
|00002ce0| 61 70 74 65 72 28 24 30 | 29 3b 0d 09 09 09 54 4f |apter($0|);....TO|
|00002cf0| 43 5b 2b 2b 68 32 43 6f | 75 6e 74 65 72 5d 20 3d |C[++h2Co|unter] =|
|00002d00| 20 24 30 20 53 55 42 53 | 45 50 3b 0d 09 09 09 67 | $0 SUBS|EP;....g|
|00002d10| 65 74 6c 69 6e 65 20 3c | 20 69 6e 70 75 74 46 69 |etline <| inputFi|
|00002d20| 6c 65 3b 0d 09 09 09 7d | 0d 09 09 23 20 53 65 63 |le;....}|...# Sec|
|00002d30| 6f 6e 64 20 6c 65 76 65 | 6c 20 68 65 61 64 69 6e |ond leve|l headin|
|00002d40| 67 2c 20 73 68 6f 77 6e | 20 69 6e 20 6d 61 69 6e |g, shown| in main|
|00002d50| 20 63 6f 6e 74 65 6e 74 | 73 0d 09 09 65 6c 73 65 | content|s...else|
|00002d60| 20 69 66 20 28 24 30 20 | 7e 20 2f 5e a4 5c 74 2f | if ($0 |~ /^.\t/|
|00002d70| 29 0d 09 09 09 7b 0d 09 | 09 09 74 65 6d 70 4c 69 |)....{..|..tempLi|
|00002d80| 6e 65 20 3d 20 73 75 62 | 73 74 72 28 24 30 2c 20 |ne = sub|str($0, |
|00002d90| 33 29 3b 0d 09 09 09 24 | 30 20 3d 20 74 65 6d 70 |3);....$|0 = temp|
|00002da0| 4c 69 6e 65 3b 0d 09 09 | 09 52 65 70 6c 61 63 65 |Line;...|.Replace|
|00002db0| 53 70 65 63 69 61 6c 43 | 68 61 72 61 63 74 65 72 |SpecialC|haracter|
|00002dc0| 73 28 29 3b 0d 09 09 09 | 54 4f 43 5b 68 32 43 6f |s();....|TOC[h2Co|
|00002dd0| 75 6e 74 65 72 5d 20 3d | 20 54 4f 43 5b 68 32 43 |unter] =| TOC[h2C|
|00002de0| 6f 75 6e 74 65 72 5d 20 | 24 30 20 53 55 42 53 45 |ounter] |$0 SUBSE|
|00002df0| 50 3b 0d 09 09 09 50 72 | 69 6e 74 48 65 61 64 69 |P;....Pr|intHeadi|
|00002e00| 6e 67 28 24 30 2c 20 22 | 48 33 22 29 3b 0d 09 09 |ng($0, "|H3");...|
|00002e10| 09 7d 0d 09 09 23 20 53 | 65 63 6f 6e 64 20 6c 65 |.}...# S|econd le|
|00002e20| 76 65 6c 20 68 65 61 64 | 69 6e 67 2c 20 4e 4f 54 |vel head|ing, NOT|
|00002e30| 20 73 68 6f 77 6e 20 69 | 6e 20 6d 61 69 6e 20 63 | shown i|n main c|
|00002e40| 6f 6e 74 65 6e 74 73 0d | 09 09 23 20 2d 2d 20 6e |ontents.|..# -- n|
|00002e50| 61 6d 65 20 69 73 20 70 | 72 65 63 65 64 65 64 20 |ame is p|receded |
|00002e60| 77 69 74 68 20 22 21 22 | 20 69 6e 20 54 4f 43 20 |with "!"| in TOC |
|00002e70| 61 72 72 61 79 20 74 6f | 20 73 69 67 6e 61 6c 20 |array to| signal |
|00002e80| 74 68 61 74 2e 0d 09 09 | 65 6c 73 65 20 69 66 20 |that....|else if |
|00002e90| 28 24 30 20 7e 20 2f 5e | 5c 28 a4 5c 29 5c 74 2f |($0 ~ /^|\(.\)\t/|
|00002ea0| 29 0d 09 09 09 7b 0d 09 | 09 09 74 65 6d 70 4c 69 |)....{..|..tempLi|
|00002eb0| 6e 65 20 3d 20 73 75 62 | 73 74 72 28 24 30 2c 20 |ne = sub|str($0, |
|00002ec0| 35 29 3b 0d 09 09 09 24 | 30 20 3d 20 74 65 6d 70 |5);....$|0 = temp|
|00002ed0| 4c 69 6e 65 3b 0d 09 09 | 09 52 65 70 6c 61 63 65 |Line;...|.Replace|
|00002ee0| 53 70 65 63 69 61 6c 43 | 68 61 72 61 63 74 65 72 |SpecialC|haracter|
|00002ef0| 73 28 29 3b 0d 09 09 09 | 54 4f 43 5b 68 32 43 6f |s();....|TOC[h2Co|
|00002f00| 75 6e 74 65 72 5d 20 3d | 20 54 4f 43 5b 68 32 43 |unter] =| TOC[h2C|
|00002f10| 6f 75 6e 74 65 72 5d 20 | 22 21 22 20 24 30 20 53 |ounter] |"!" $0 S|
|00002f20| 55 42 53 45 50 3b 0d 09 | 09 09 50 72 69 6e 74 48 |UBSEP;..|..PrintH|
|00002f30| 65 61 64 69 6e 67 28 24 | 30 2c 20 22 48 33 22 29 |eading($|0, "H3")|
|00002f40| 3b 0d 09 09 09 7d 0d 09 | 09 23 20 54 68 69 72 64 |;....}..|.# Third|
|00002f50| 20 6c 65 76 65 6c 20 68 | 65 61 64 69 6e 67 2c 20 | level h|eading, |
|00002f60| 6e 6f 74 20 69 6e 20 61 | 6e 79 20 63 6f 6e 74 65 |not in a|ny conte|
|00002f70| 6e 74 73 20 28 61 6c 74 | 68 6f 75 67 68 20 69 74 |nts (alt|hough it|
|00002f80| 20 64 6f 65 73 20 68 61 | 76 65 20 61 6e 20 61 6e | does ha|ve an an|
|00002f90| 63 68 6f 72 29 0d 09 09 | 65 6c 73 65 20 69 66 20 |chor)...|else if |
|00002fa0| 28 24 30 20 7e 20 2f 5e | 3e 5c 74 2f 29 0d 09 09 |($0 ~ /^|>\t/)...|
|00002fb0| 09 7b 0d 09 09 09 74 65 | 6d 70 4c 69 6e 65 20 3d |.{....te|mpLine =|
|00002fc0| 20 73 75 62 73 74 72 28 | 24 30 2c 20 33 29 3b 0d | substr(|$0, 3);.|
|00002fd0| 09 09 09 24 30 20 3d 20 | 74 65 6d 70 4c 69 6e 65 |...$0 = |tempLine|
|00002fe0| 3b 0d 09 09 09 52 65 70 | 6c 61 63 65 53 70 65 63 |;....Rep|laceSpec|
|00002ff0| 69 61 6c 43 68 61 72 61 | 63 74 65 72 73 28 29 3b |ialChara|cters();|
|00003000| 0d 09 09 09 50 72 69 6e | 74 48 65 61 64 69 6e 67 |....Prin|tHeading|
|00003010| 28 24 30 2c 20 22 48 34 | 22 29 3b 0d 09 09 09 7d |($0, "H4|");....}|
|00003020| 0d 09 09 23 20 47 49 46 | 20 65 6e 74 72 79 2c 20 |...# GIF| entry, |
|00003030| 3c 6f 70 74 69 6f 6e 3e | 3c 73 70 61 63 65 3e 20 |<option>|<space> |
|00003040| 62 79 20 69 74 73 65 6c | 66 20 6f 6e 20 61 20 6c |by itsel|f on a l|
|00003050| 69 6e 65 0d 09 09 65 6c | 73 65 20 69 66 20 28 24 |ine...el|se if ($|
|00003060| 30 20 7e 20 2f 5e ca 24 | 2f 29 0d 09 09 09 7b 0d |0 ~ /^.$|/)....{.|
|00003070| 09 09 09 50 72 69 6e 74 | 47 49 46 54 61 67 28 67 |...Print|GIFTag(g|
|00003080| 69 66 50 61 72 74 69 61 | 6c 4c 6f 63 61 74 69 6f |ifPartia|lLocatio|
|00003090| 6e 2c 20 67 69 66 4e 61 | 6d 65 5b 2b 2b 63 75 72 |n, gifNa|me[++cur|
|000030a0| 72 65 6e 74 47 49 46 5d | 29 3b 0d 09 09 09 64 6f |rentGIF]|);....do|
|000030b0| 69 6e 67 47 49 46 20 3d | 20 31 3b 0d 09 09 09 7d |ingGIF =| 1;....}|
|000030c0| 0d 09 09 23 20 72 65 67 | 75 6c 61 72 20 6c 69 6e |...# reg|ular lin|
|000030d0| 65 0d 09 09 65 6c 73 65 | 0d 09 09 09 7b 0d 09 09 |e...else|....{...|
|000030e0| 09 52 65 70 6c 61 63 65 | 53 70 65 63 69 61 6c 43 |.Replace|SpecialC|
|000030f0| 68 61 72 61 63 74 65 72 | 73 28 29 3b 0d 09 09 09 |haracter|s();....|
|00003100| 69 66 20 28 6e 65 77 50 | 61 72 61 67 72 61 70 68 |if (newP|aragraph|
|00003110| 43 6f 6d 69 6e 67 20 3d | 3d 20 31 29 0d 09 09 09 |Coming =|= 1)....|
|00003120| 09 50 72 69 6e 74 54 6f | 4f 75 74 46 69 6c 65 28 |.PrintTo|OutFile(|
|00003130| 22 3c 50 3e 22 20 24 30 | 29 3b 0d 09 09 09 65 6c |"<P>" $0|);....el|
|00003140| 73 65 0d 09 09 09 09 50 | 72 69 6e 74 54 6f 4f 75 |se.....P|rintToOu|
|00003150| 74 46 69 6c 65 28 24 30 | 29 3b 0d 09 09 09 6e 65 |tFile($0|);....ne|
|00003160| 77 50 61 72 61 67 72 61 | 70 68 43 6f 6d 69 6e 67 |wParagra|phComing|
|00003170| 20 3d 20 30 3b 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 | = 0;...|.}...}..|
|00003180| 7d 0d 0d 23 20 4c 6f 61 | 64 20 41 4e 44 20 73 6f |}..# Loa|d AND so|
|00003190| 72 74 20 74 68 65 20 67 | 69 66 20 6e 61 6d 65 73 |rt the g|if names|
|000031a0| 2c 20 74 6f 20 67 69 66 | 4e 61 6d 65 5b 20 31 2e |, to gif|Name[ 1.|
|000031b0| 2e 6e 75 6d 47 49 46 73 | 20 5d 2e 0d 23 20 28 67 |.numGIFs| ]..# (g|
|000031c0| 69 66 20 6e 61 6d 65 20 | 66 6f 72 6d 61 74 20 69 |if name |format i|
|000031d0| 73 20 22 61 72 62 74 65 | 78 74 23 64 64 64 64 64 |s "arbte|xt#ddddd|
|000031e0| 2e 67 69 66 22 29 0d 66 | 75 6e 63 74 69 6f 6e 20 |.gif").f|unction |
|000031f0| 4c 6f 61 64 47 49 46 4e | 61 6d 65 73 28 09 09 78 |LoadGIFN|ames(..x|
|00003200| 2c 20 70 2c 20 61 2c 20 | 62 2c 20 6e 75 6d 53 70 |, p, a, |b, numSp|
|00003210| 6f 74 2c 20 6e 75 6d 41 | 2c 20 74 72 75 65 50 2c |ot, numA|, trueP,|
|00003220| 20 69 29 0d 09 7b 0d 09 | 6e 75 6d 47 49 46 73 20 | i)..{..|numGIFs |
|00003230| 3d 20 30 3b 0d 09 6e 75 | 6d 41 20 3d 20 30 3b 0d |= 0;..nu|mA = 0;.|
|00003240| 09 77 68 69 6c 65 20 28 | 28 67 65 74 6c 69 6e 65 |.while (|(getline|
|00003250| 20 78 20 3c 20 67 69 66 | 41 72 72 61 79 46 69 6c | x < gif|ArrayFil|
|00003260| 65 29 20 3e 20 30 29 0d | 09 09 70 5b 2b 2b 6e 75 |e) > 0).|..p[++nu|
|00003270| 6d 47 49 46 73 5d 20 3d | 20 78 3b 0d 09 66 6f 72 |mGIFs] =| x;..for|
|00003280| 20 28 69 20 3d 20 31 3b | 20 69 20 3c 3d 20 6e 75 | (i = 1;| i <= nu|
|00003290| 6d 47 49 46 73 3b 20 2b | 2b 69 29 0d 09 09 7b 0d |mGIFs; +|+i)...{.|
|000032a0| 09 09 6e 75 6d 53 70 6f | 74 20 3d 20 6d 61 74 63 |..numSpo|t = matc|
|000032b0| 68 28 70 5b 69 5d 2c 20 | 2f 23 5b 30 2d 39 5d 2b |h(p[i], |/#[0-9]+|
|000032c0| 2f 29 3b 0d 09 09 23 20 | 61 6c 6c 6f 77 20 6f 74 |/);...# |allow ot|
|000032d0| 68 65 72 20 66 69 6c 65 | 73 20 69 6e 20 66 6f 6c |her file|s in fol|
|000032e0| 64 65 72 2c 20 6f 72 20 | 6f 74 68 65 72 20 74 65 |der, or |other te|
|000032f0| 78 74 20 69 6e 20 6c 69 | 73 74 0d 09 09 69 66 20 |xt in li|st...if |
|00003300| 28 6e 75 6d 53 70 6f 74 | 20 3e 20 30 29 0d 09 09 |(numSpot| > 0)...|
|00003310| 09 7b 0d 09 09 09 61 5b | 2b 2b 6e 75 6d 41 5d 20 |.{....a[|++numA] |
|00003320| 3d 20 73 75 62 73 74 72 | 28 70 5b 69 5d 2c 20 6e |= substr|(p[i], n|
|00003330| 75 6d 53 70 6f 74 2b 31 | 2c 20 52 4c 45 4e 47 54 |umSpot+1|, RLENGT|
|00003340| 48 2d 31 29 3b 0d 09 09 | 09 74 72 75 65 50 5b 6e |H-1);...|.trueP[n|
|00003350| 75 6d 41 5d 20 3d 20 70 | 5b 69 5d 3b 0d 09 09 09 |umA] = p|[i];....|
|00003360| 7d 0d 09 09 7d 0d 09 69 | 66 20 28 6e 75 6d 41 2b |}...}..i|f (numA+|
|00003370| 30 20 3e 20 30 29 0d 09 | 09 7b 0d 09 09 73 6f 72 |0 > 0)..|.{...sor|
|00003380| 74 28 61 2c 62 2c 22 6e | 22 29 3b 0d 09 09 66 6f |t(a,b,"n|");...fo|
|00003390| 72 20 28 69 20 3d 20 31 | 3b 20 69 20 3c 3d 20 6e |r (i = 1|; i <= n|
|000033a0| 75 6d 41 3b 20 2b 2b 69 | 29 0d 09 09 09 7b 0d 09 |umA; ++i|)....{..|
|000033b0| 09 09 67 69 66 4e 61 6d | 65 5b 69 5d 20 3d 20 74 |..gifNam|e[i] = t|
|000033c0| 72 75 65 50 5b 62 5b 69 | 5d 5d 3b 0d 09 09 09 7d |rueP[b[i|]];....}|
|000033d0| 0d 09 09 7d 0d 09 6e 75 | 6d 47 49 46 73 20 3d 20 |...}..nu|mGIFs = |
|000033e0| 6e 75 6d 41 3b 0d 09 7d | 0d 0d 23 20 50 72 69 6e |numA;..}|..# Prin|
|000033f0| 74 20 74 6f 20 73 70 65 | 63 69 66 69 63 20 66 69 |t to spe|cific fi|
|00003400| 6c 65 2c 20 69 66 20 74 | 68 65 72 65 20 69 73 20 |le, if t|here is |
|00003410| 6f 6e 65 2e 0d 66 75 6e | 63 74 69 6f 6e 20 50 72 |one..fun|ction Pr|
|00003420| 69 6e 74 54 6f 4f 75 74 | 46 69 6c 65 28 73 29 0d |intToOut|File(s).|
|00003430| 09 7b 0d 09 69 66 20 28 | 6f 75 74 46 69 6c 65 20 |.{..if (|outFile |
|00003440| 21 3d 20 22 22 29 0d 09 | 09 70 72 69 6e 74 20 73 |!= "")..|.print s|
|00003450| 20 3e 20 6f 75 74 46 69 | 6c 65 3b 0d 09 7d 0d 0d | > outFi|le;..}..|
|00003460| 66 75 6e 63 74 69 6f 6e | 20 52 65 70 6c 61 63 65 |function| Replace|
|00003470| 53 70 65 63 69 61 6c 43 | 68 61 72 61 63 74 65 72 |SpecialC|haracter|
|00003480| 73 28 29 0d 09 7b 0d 09 | 67 73 75 62 28 2f 5c 26 |s()..{..|gsub(/\&|
|00003490| 2f 2c 20 61 6d 70 65 72 | 73 61 6e 64 29 3b 20 23 |/, amper|sand); #|
|000034a0| 20 6b 65 65 70 20 74 68 | 69 73 20 6f 6e 65 20 66 | keep th|is one f|
|000034b0| 69 72 73 74 0d 09 67 73 | 75 62 28 2f 3c 2f 2c 20 |irst..gs|ub(/</, |
|000034c0| 6c 65 73 73 54 68 61 6e | 29 3b 0d 09 67 73 75 62 |lessThan|);..gsub|
|000034d0| 28 2f 3e 2f 2c 20 67 72 | 65 61 74 65 72 54 68 61 |(/>/, gr|eaterTha|
|000034e0| 6e 29 3b 0d 09 67 73 75 | 62 28 2f c7 2f 2c 20 65 |n);..gsu|b(/./, e|
|000034f0| 75 72 6f 4c 65 66 74 29 | 3b 0d 09 67 73 75 62 28 |uroLeft)|;..gsub(|
|00003500| 2f c8 2f 2c 20 65 75 72 | 6f 52 69 67 68 74 29 3b |/./, eur|oRight);|
|00003510| 0d 09 67 73 75 62 28 2f | a5 2f 2c 20 62 75 6c 6c |..gsub(/|./, bull|
|00003520| 65 74 29 3b 0d 09 67 73 | 75 62 28 2f c2 2f 2c 20 |et);..gs|ub(/./, |
|00003530| 64 6f 72 6e 6b 29 3b 0d | 09 67 73 75 62 28 2f a4 |dornk);.|.gsub(/.|
|00003540| 2f 2c 20 73 65 63 74 69 | 6f 6e 29 3b 0d 09 67 73 |/, secti|on);..gs|
|00003550| 75 62 28 2f a6 2f 2c 20 | 70 61 72 61 29 3b 0d 09 |ub(/./, |para);..|
|00003560| 67 73 75 62 28 2f 8d 2f | 2c 20 63 65 64 69 6c 6c |gsub(/./|, cedill|
|00003570| 61 43 29 3b 0d 09 67 73 | 75 62 28 2f d1 2f 2c 20 |aC);..gs|ub(/./, |
|00003580| 73 68 79 29 3b 0d 09 67 | 73 75 62 28 2f a9 2f 2c |shy);..g|sub(/./,|
|00003590| 20 63 6f 70 79 72 69 67 | 68 74 29 3b 0d 09 67 73 | copyrig|ht);..gs|
|000035a0| 75 62 28 2f a8 2f 2c 20 | 72 65 67 69 73 74 72 61 |ub(/./, |registra|
|000035b0| 74 69 6f 6e 29 3b 0d 09 | 0d 09 23 20 51 75 65 73 |tion);..|..# Ques|
|000035c0| 74 69 6f 6e 20 6d 61 72 | 6b 20 67 69 76 65 73 20 |tion mar|k gives |
|000035d0| 74 72 6f 75 62 6c 65 20 | 69 6e 20 61 6e 63 68 6f |trouble |in ancho|
|000035e0| 72 73 2c 20 64 6f 20 69 | 74 20 74 6f 6f 0d 09 23 |rs, do i|t too..#|
|000035f0| 67 73 75 62 28 2f 5c 3f | 2f 2c 20 71 75 65 73 74 |gsub(/\?|/, quest|
|00003600| 69 6f 6e 29 3b 0d 09 0d | 09 23 20 53 68 6f 72 74 |ion);...|.# Short|
|00003610| 20 64 61 73 68 20 2d 2d | 20 77 68 65 72 65 20 69 | dash --| where i|
|00003620| 73 20 69 74 20 69 6e 20 | 74 68 65 20 49 53 4f 20 |s it in |the ISO |
|00003630| 4c 61 74 69 6e 2d 31 20 | 73 65 74 3f 3f 0d 09 67 |Latin-1 |set??..g|
|00003640| 73 75 62 28 2f d0 2f 2c | 20 22 2d 22 29 3b 0d 09 |sub(/./,| "-");..|
|00003650| 23 20 44 69 74 74 6f 20 | 22 c9 22 0d 09 67 73 75 |# Ditto |"."..gsu|
|00003660| 62 28 2f c9 2f 2c 20 22 | 2e 2e 2e 22 29 3b 0d 09 |b(/./, "|...");..|
|00003670| 23 20 41 6e 64 20 68 65 | 79 2c 20 77 68 65 72 65 |# And he|y, where|
|00003680| 27 73 20 c4 3f 0d 09 67 | 73 75 62 28 2f c4 2f 2c |'s .?..g|sub(/./,|
|00003690| 20 22 66 22 29 3b 0d 09 | 0d 09 23 20 73 74 72 61 | "f");..|..# stra|
|000036a0| 69 67 68 74 65 6e 20 6f | 75 74 20 74 68 65 20 71 |ighten o|ut the q|
|000036b0| 75 6f 74 65 73 20 61 6e | 64 20 74 69 63 6b 73 0d |uotes an|d ticks.|
|000036c0| 09 67 73 75 62 28 2f d2 | 2f 2c 20 22 5c 22 22 29 |.gsub(/.|/, "\"")|
|000036d0| 3b 0d 09 67 73 75 62 28 | 2f d3 2f 2c 20 22 5c 22 |;..gsub(|/./, "\"|
|000036e0| 22 29 3b 0d 09 67 73 75 | 62 28 2f d4 2f 2c 20 22 |");..gsu|b(/./, "|
|000036f0| 27 22 29 3b 0d 09 67 73 | 75 62 28 2f d5 2f 2c 20 |'");..gs|ub(/./, |
|00003700| 22 27 22 29 3b 0d 09 23 | 20 64 6f 20 71 75 6f 74 |"'");..#| do quot|
|00003710| 65 73 20 6c 61 73 74 20 | 73 69 6e 63 65 20 77 65 |es last |since we|
|00003720| 20 6d 61 79 20 68 61 76 | 65 20 67 65 6e 65 72 61 | may hav|e genera|
|00003730| 74 65 64 20 73 6f 6d 65 | 20 6e 65 77 20 6f 6e 65 |ted some| new one|
|00003740| 73 0d 09 67 73 75 62 28 | 2f 22 2f 2c 20 71 75 6f |s..gsub(|/"/, quo|
|00003750| 74 65 29 3b 0d 09 7d 0d | 0d 66 75 6e 63 74 69 6f |te);..}.|.functio|
|00003760| 6e 20 53 69 6d 70 6c 69 | 66 79 51 75 6f 74 65 73 |n Simpli|fyQuotes|
|00003770| 28 29 0d 09 7b 0d 09 67 | 73 75 62 28 2f d2 2f 2c |()..{..g|sub(/./,|
|00003780| 20 22 27 22 29 3b 0d 09 | 67 73 75 62 28 2f d3 2f | "'");..|gsub(/./|
|00003790| 2c 20 22 27 22 29 3b 0d | 09 67 73 75 62 28 2f d4 |, "'");.|.gsub(/.|
|000037a0| 2f 2c 20 22 27 22 29 3b | 0d 09 67 73 75 62 28 2f |/, "'");|..gsub(/|
|000037b0| d5 2f 2c 20 22 27 22 29 | 3b 0d 09 67 73 75 62 28 |./, "'")|;..gsub(|
|000037c0| 2f 22 2f 2c 20 22 27 22 | 29 3b 0d 09 7d 0d 0d 23 |/"/, "'"|);..}..#|
|000037d0| 20 53 6b 69 70 20 74 68 | 65 20 22 43 4f 4e 54 45 | Skip th|e "CONTE|
|000037e0| 4e 54 53 22 20 73 65 63 | 74 69 6f 6e 2e 0d 66 75 |NTS" sec|tion..fu|
|000037f0| 6e 63 74 69 6f 6e 20 53 | 6b 69 70 55 6e 77 61 6e |nction S|kipUnwan|
|00003800| 74 65 64 53 65 63 74 69 | 6f 6e 73 28 29 0d 09 7b |tedSecti|ons()..{|
|00003810| 0d 09 69 66 20 28 24 30 | 20 7e 20 2f 5e 5b 20 5c |..if ($0| ~ /^[ \|
|00003820| 74 5d 2a 43 4f 4e 54 45 | 4e 54 53 5b 20 5c 74 5d |t]*CONTE|NTS[ \t]|
|00003830| 2a 24 2f 29 0d 09 09 7b | 0d 09 09 67 65 74 6c 69 |*$/)...{|...getli|
|00003840| 6e 65 20 3c 20 69 6e 70 | 75 74 46 69 6c 65 3b 0d |ne < inp|utFile;.|
|00003850| 09 09 77 68 69 6c 65 20 | 28 28 67 65 74 6c 69 6e |..while |((getlin|
|00003860| 65 20 3c 20 69 6e 70 75 | 74 46 69 6c 65 29 20 3e |e < inpu|tFile) >|
|00003870| 20 30 29 0d 09 09 09 7b | 0d 09 09 09 69 66 20 28 | 0)....{|....if (|
|00003880| 24 30 20 7e 20 2f 5e 2d | 5b 20 5c 74 2d 5d 2b 24 |$0 ~ /^-|[ \t-]+$|
|00003890| 2f 29 0d 09 09 09 09 7b | 0d 09 09 09 09 67 65 74 |/).....{|.....get|
|000038a0| 6c 69 6e 65 20 3c 20 69 | 6e 70 75 74 46 69 6c 65 |line < i|nputFile|
|000038b0| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|000038c0| 09 7d 0d 09 09 09 7d 0d | 09 09 7d 0d 09 7d 0d 0d |.}....}.|..}..}..|
|000038d0| 23 20 46 69 6e 69 73 68 | 20 77 72 69 74 69 6e 67 |# Finish| writing|
|000038e0| 20 63 75 72 72 65 6e 74 | 20 63 68 61 70 74 65 72 | current| chapter|
|000038f0| 2c 20 69 66 20 61 6e 79 | 2e 20 53 74 61 72 74 20 |, if any|. Start |
|00003900| 61 20 6e 65 77 20 74 65 | 6d 70 20 66 69 6c 65 20 |a new te|mp file |
|00003910| 66 6f 72 0d 23 20 6e 65 | 78 74 20 63 68 61 70 74 |for.# ne|xt chapt|
|00003920| 65 72 20 28 74 61 63 6b | 20 22 78 22 20 6f 6e 74 |er (tack| "x" ont|
|00003930| 6f 20 63 68 61 70 74 65 | 72 20 6e 61 6d 65 20 66 |o chapte|r name f|
|00003940| 6f 72 20 74 68 65 20 74 | 65 6d 70 20 76 65 72 73 |or the t|emp vers|
|00003950| 69 6f 6e 29 0d 23 20 61 | 6e 64 20 70 75 6d 70 20 |ion).# a|nd pump |
|00003960| 6f 75 74 20 74 68 65 20 | 73 74 61 72 74 69 6e 67 |out the |starting|
|00003970| 20 48 54 4d 4c 2e 0d 66 | 75 6e 63 74 69 6f 6e 20 | HTML..f|unction |
|00003980| 53 74 61 72 74 4e 65 77 | 43 68 61 70 74 65 72 28 |StartNew|Chapter(|
|00003990| 63 68 61 70 74 65 72 4e | 61 6d 65 2c 09 09 74 72 |chapterN|ame,..tr|
|000039a0| 75 6e 63 61 74 65 64 4e | 61 6d 65 2c 20 6e 61 6d |uncatedN|ame, nam|
|000039b0| 65 4c 65 6e 67 74 68 29 | 0d 09 7b 0d 09 69 66 20 |eLength)|..{..if |
|000039c0| 28 6f 75 74 46 69 6c 65 | 20 21 3d 20 22 22 29 0d |(outFile| != "").|
|000039d0| 09 09 46 69 6e 69 73 68 | 43 75 72 72 65 6e 74 43 |..Finish|CurrentC|
|000039e0| 68 61 70 74 65 72 28 29 | 3b 0d 09 74 72 75 6e 63 |hapter()|;..trunc|
|000039f0| 61 74 65 64 4e 61 6d 65 | 20 3d 20 54 65 6d 70 46 |atedName| = TempF|
|00003a00| 69 6c 65 4e 61 6d 65 46 | 6f 72 43 68 61 70 74 65 |ileNameF|orChapte|
|00003a10| 72 28 63 68 61 70 74 65 | 72 4e 61 6d 65 29 3b 0d |r(chapte|rName);.|
|00003a20| 09 6f 75 74 46 69 6c 65 | 20 3d 20 63 68 61 70 74 |.outFile| = chapt|
|00003a30| 65 72 73 46 6f 6c 64 65 | 72 20 74 72 75 6e 63 61 |ersFolde|r trunca|
|00003a40| 74 65 64 4e 61 6d 65 3b | 0d 09 53 74 61 72 74 48 |tedName;|..StartH|
|00003a50| 54 4d 4c 28 63 68 61 70 | 74 65 72 4e 61 6d 65 29 |TML(chap|terName)|
|00003a60| 3b 0d 09 7d 0d 0d 66 75 | 6e 63 74 69 6f 6e 20 54 |;..}..fu|nction T|
|00003a70| 65 6d 70 46 69 6c 65 4e | 61 6d 65 46 6f 72 43 68 |empFileN|ameForCh|
|00003a80| 61 70 74 65 72 28 63 68 | 61 70 74 65 72 4e 61 6d |apter(ch|apterNam|
|00003a90| 65 2c 09 09 66 69 6c 65 | 4e 61 6d 65 2c 20 6e 61 |e,..file|Name, na|
|00003aa0| 6d 65 4c 65 6e 67 74 68 | 29 0d 09 7b 0d 09 66 69 |meLength|)..{..fi|
|00003ab0| 6c 65 4e 61 6d 65 20 3d | 20 63 68 61 70 74 65 72 |leName =| chapter|
|00003ac0| 4e 61 6d 65 20 22 2e 68 | 74 6d 6c 22 20 22 78 22 |Name ".h|tml" "x"|
|00003ad0| 3b 0d 09 6e 61 6d 65 4c | 65 6e 67 74 68 20 3d 20 |;..nameL|ength = |
|00003ae0| 6c 65 6e 67 74 68 28 66 | 69 6c 65 4e 61 6d 65 29 |length(f|ileName)|
|00003af0| 3b 0d 09 69 66 20 28 6e | 61 6d 65 4c 65 6e 67 74 |;..if (n|ameLengt|
|00003b00| 68 20 3e 20 33 31 29 0d | 09 09 66 69 6c 65 4e 61 |h > 31).|..fileNa|
|00003b10| 6d 65 20 3d 20 73 75 62 | 73 74 72 28 63 68 61 70 |me = sub|str(chap|
|00003b20| 74 65 72 4e 61 6d 65 2c | 20 31 2c 20 32 35 29 20 |terName,| 1, 25) |
|00003b30| 22 2e 68 74 6d 6c 22 20 | 22 78 22 3b 0d 09 72 65 |".html" |"x";..re|
|00003b40| 74 75 72 6e 20 66 69 6c | 65 4e 61 6d 65 3b 0d 09 |turn fil|eName;..|
|00003b50| 7d 0d 0d 66 75 6e 63 74 | 69 6f 6e 20 46 69 6c 65 |}..funct|ion File|
|00003b60| 4e 61 6d 65 46 6f 72 43 | 68 61 70 74 65 72 28 63 |NameForC|hapter(c|
|00003b70| 68 61 70 74 65 72 4e 61 | 6d 65 2c 09 09 66 69 6c |hapterNa|me,..fil|
|00003b80| 65 4e 61 6d 65 2c 20 74 | 65 6d 70 4e 61 6d 65 2c |eName, t|empName,|
|00003b90| 20 6e 61 6d 65 4c 65 6e | 67 74 68 29 0d 09 7b 0d | nameLen|gth)..{.|
|00003ba0| 09 74 65 6d 70 4e 61 6d | 65 20 3d 20 54 65 6d 70 |.tempNam|e = Temp|
|00003bb0| 46 69 6c 65 4e 61 6d 65 | 46 6f 72 43 68 61 70 74 |FileName|ForChapt|
|00003bc0| 65 72 28 63 68 61 70 74 | 65 72 4e 61 6d 65 29 3b |er(chapt|erName);|
|00003bd0| 0d 09 6e 61 6d 65 4c 65 | 6e 67 74 68 20 3d 20 6c |..nameLe|ngth = l|
|00003be0| 65 6e 67 74 68 28 74 65 | 6d 70 4e 61 6d 65 29 3b |ength(te|mpName);|
|00003bf0| 0d 09 66 69 6c 65 4e 61 | 6d 65 20 3d 20 73 75 62 |..fileNa|me = sub|
|00003c00| 73 74 72 28 74 65 6d 70 | 4e 61 6d 65 2c 20 31 2c |str(temp|Name, 1,|
|00003c10| 20 6e 61 6d 65 4c 65 6e | 67 74 68 20 2d 20 31 29 | nameLen|gth - 1)|
|00003c20| 3b 0d 09 72 65 74 75 72 | 6e 20 66 69 6c 65 4e 61 |;..retur|n fileNa|
|00003c30| 6d 65 3b 0d 09 7d 0d 0d | 23 20 43 6c 6f 73 65 20 |me;..}..|# Close |
|00003c40| 74 65 6d 70 20 66 69 6c | 65 20 66 6f 72 20 63 68 |temp fil|e for ch|
|00003c50| 61 70 74 65 72 3b 20 63 | 6f 70 79 20 69 74 20 74 |apter; c|opy it t|
|00003c60| 6f 20 66 69 6e 61 6c 20 | 76 65 72 73 69 6f 6e 2c |o final |version,|
|00003c70| 20 69 6e 73 65 72 74 69 | 6e 67 0d 23 20 54 4f 43 | inserti|ng.# TOC|
|00003c80| 20 61 74 20 74 6f 70 3b | 20 64 65 6c 65 74 65 20 | at top;| delete |
|00003c90| 74 65 6d 70 20 66 69 6c | 65 2e 0d 66 75 6e 63 74 |temp fil|e..funct|
|00003ca0| 69 6f 6e 20 46 69 6e 69 | 73 68 43 75 72 72 65 6e |ion Fini|shCurren|
|00003cb0| 74 43 68 61 70 74 65 72 | 28 09 09 6e 61 6d 65 4c |tChapter|(..nameL|
|00003cc0| 65 6e 67 74 68 29 0d 09 | 7b 0d 09 50 72 69 6e 74 |ength)..|{..Print|
|00003cd0| 54 6f 4f 75 74 46 69 6c | 65 28 22 3c 50 3e 22 29 |ToOutFil|e("<P>")|
|00003ce0| 3b 0d 09 44 6f 43 68 61 | 70 74 65 72 54 4f 43 28 |;..DoCha|pterTOC(|
|00003cf0| 29 3b 0d 09 45 6e 64 48 | 54 4d 4c 28 29 3b 0d 09 |);..EndH|TML();..|
|00003d00| 63 6c 6f 73 65 28 6f 75 | 74 46 69 6c 65 29 3b 0d |close(ou|tFile);.|
|00003d10| 09 6f 6c 64 4f 75 74 46 | 69 6c 65 20 3d 20 6f 75 |.oldOutF|ile = ou|
|00003d20| 74 46 69 6c 65 3b 0d 09 | 6e 61 6d 65 4c 65 6e 67 |tFile;..|nameLeng|
|00003d30| 74 68 20 3d 20 6c 65 6e | 67 74 68 28 6f 75 74 46 |th = len|gth(outF|
|00003d40| 69 6c 65 29 3b 0d 09 6f | 75 74 46 69 6c 65 20 3d |ile);..o|utFile =|
|00003d50| 20 73 75 62 73 74 72 28 | 6f 75 74 46 69 6c 65 2c | substr(|outFile,|
|00003d60| 20 31 2c 20 6e 61 6d 65 | 4c 65 6e 67 74 68 20 2d | 1, name|Length -|
|00003d70| 20 31 29 3b 0d 09 57 72 | 69 74 65 46 69 6e 61 6c | 1);..Wr|iteFinal|
|00003d80| 43 68 61 70 74 65 72 28 | 29 3b 0d 09 63 6c 6f 73 |Chapter(|);..clos|
|00003d90| 65 28 6f 75 74 46 69 6c | 65 29 3b 0d 09 63 6c 6f |e(outFil|e);..clo|
|00003da0| 73 65 28 6f 6c 64 4f 75 | 74 46 69 6c 65 29 3b 0d |se(oldOu|tFile);.|
|00003db0| 09 72 65 6d 6f 76 65 28 | 6f 6c 64 4f 75 74 46 69 |.remove(|oldOutFi|
|00003dc0| 6c 65 29 3b 0d 09 23 20 | 74 65 6d 70 6f 72 61 72 |le);..# |temporar|
|00003dd0| 69 6c 79 2c 20 77 65 20 | 68 61 76 65 20 6e 6f 20 |ily, we |have no |
|00003de0| 6f 75 74 46 69 6c 65 20 | 74 6f 20 77 72 69 74 65 |outFile |to write|
|00003df0| 20 74 6f 0d 09 6f 75 74 | 46 69 6c 65 20 3d 20 22 | to..out|File = "|
|00003e00| 22 3b 0d 09 7d 0d 0d 66 | 75 6e 63 74 69 6f 6e 20 |";..}..f|unction |
|00003e10| 53 74 61 72 74 48 54 4d | 4c 28 63 68 61 70 74 65 |StartHTM|L(chapte|
|00003e20| 72 4e 61 6d 65 29 0d 09 | 7b 0d 09 50 72 69 6e 74 |rName)..|{..Print|
|00003e30| 54 6f 4f 75 74 46 69 6c | 65 28 22 3c 48 54 4d 4c |ToOutFil|e("<HTML|
|00003e40| 3e 22 29 3b 0d 09 50 72 | 69 6e 74 54 6f 4f 75 74 |>");..Pr|intToOut|
|00003e50| 46 69 6c 65 28 22 22 29 | 3b 0d 09 50 72 69 6e 74 |File("")|;..Print|
|00003e60| 54 6f 4f 75 74 46 69 6c | 65 28 22 3c 48 45 41 44 |ToOutFil|e("<HEAD|
|00003e70| 3e 22 29 3b 0d 09 50 72 | 69 6e 74 54 6f 4f 75 74 |>");..Pr|intToOut|
|00003e80| 46 69 6c 65 28 22 3c 54 | 49 54 4c 45 3e 22 20 63 |File("<T|ITLE>" c|
|00003e90| 68 61 70 74 65 72 4e 61 | 6d 65 20 22 3c 2f 54 49 |hapterNa|me "</TI|
|00003ea0| 54 4c 45 3e 22 29 3b 0d | 09 50 72 69 6e 74 54 6f |TLE>");.|.PrintTo|
|00003eb0| 4f 75 74 46 69 6c 65 28 | 22 3c 2f 48 45 41 44 3e |OutFile(|"</HEAD>|
|00003ec0| 22 29 3b 0d 09 50 72 69 | 6e 74 54 6f 4f 75 74 46 |");..Pri|ntToOutF|
|00003ed0| 69 6c 65 28 22 22 29 3b | 0d 09 50 72 69 6e 74 54 |ile("");|..PrintT|
|00003ee0| 6f 4f 75 74 46 69 6c 65 | 28 22 3c 42 4f 44 59 3e |oOutFile|("<BODY>|
|00003ef0| 22 29 3b 0d 09 50 72 69 | 6e 74 54 6f 4f 75 74 46 |");..Pri|ntToOutF|
|00003f00| 69 6c 65 28 22 3c 48 31 | 3e 22 20 63 68 61 70 74 |ile("<H1|>" chapt|
|00003f10| 65 72 4e 61 6d 65 20 22 | 3c 2f 48 31 3e 22 29 3b |erName "|</H1>");|
|00003f20| 0d 09 50 72 69 6e 74 54 | 6f 4f 75 74 46 69 6c 65 |..PrintT|oOutFile|
|00003f30| 28 22 3c 48 52 3e 22 29 | 3b 0d 09 50 72 69 6e 74 |("<HR>")|;..Print|
|00003f40| 54 6f 4f 75 74 46 69 6c | 65 28 22 22 29 3b 0d 09 |ToOutFil|e("");..|
|00003f50| 50 72 69 6e 74 54 6f 4f | 75 74 46 69 6c 65 28 63 |PrintToO|utFile(c|
|00003f60| 6f 6e 74 65 6e 74 73 4d | 61 72 6b 65 72 29 3b 20 |ontentsM|arker); |
|00003f70| 23 20 74 61 62 6c 65 20 | 6f 66 20 63 6f 6e 74 65 |# table |of conte|
|00003f80| 6e 74 73 20 67 6f 65 73 | 20 68 65 72 65 20 6f 6e |nts goes| here on|
|00003f90| 20 32 6e 64 20 70 61 73 | 73 0d 09 7d 0d 0d 66 75 | 2nd pas|s..}..fu|
|00003fa0| 6e 63 74 69 6f 6e 20 45 | 6e 64 48 54 4d 4c 28 29 |nction E|ndHTML()|
|00003fb0| 0d 09 7b 0d 09 50 72 69 | 6e 74 54 6f 4f 75 74 46 |..{..Pri|ntToOutF|
|00003fc0| 69 6c 65 28 22 22 29 3b | 0d 09 50 72 69 6e 74 54 |ile("");|..PrintT|
|00003fd0| 6f 4f 75 74 46 69 6c 65 | 28 22 3c 2f 42 4f 44 59 |oOutFile|("</BODY|
|00003fe0| 3e 22 29 3b 0d 09 50 72 | 69 6e 74 54 6f 4f 75 74 |>");..Pr|intToOut|
|00003ff0| 46 69 6c 65 28 22 22 29 | 3b 0d 09 50 72 69 6e 74 |File("")|;..Print|
|00004000| 54 6f 4f 75 74 46 69 6c | 65 28 22 3c 2f 48 54 4d |ToOutFil|e("</HTM|
|00004010| 4c 3e 22 29 3b 0d 09 50 | 72 69 6e 74 54 6f 4f 75 |L>");..P|rintToOu|
|00004020| 74 46 69 6c 65 28 22 22 | 29 3b 0d 09 50 72 69 6e |tFile(""|);..Prin|
|00004030| 74 54 6f 4f 75 74 46 69 | 6c 65 28 22 22 29 3b 0d |tToOutFi|le("");.|
|00004040| 09 7d 0d 0d 23 20 50 72 | 69 6e 74 20 61 20 68 65 |.}..# Pr|int a he|
|00004050| 61 64 69 6e 67 20 61 6e | 64 20 6e 61 6d 65 64 20 |ading an|d named |
|00004060| 61 6e 63 68 6f 72 2e 20 | 22 6c 65 76 65 6c 22 20 |anchor. |"level" |
|00004070| 73 68 6f 75 6c 64 20 62 | 65 20 22 48 32 22 2c 20 |should b|e "H2", |
|00004080| 22 48 33 22 20 65 74 63 | 2e 0d 23 20 48 61 76 69 |"H3" etc|..# Havi|
|00004090| 6e 67 20 74 72 6f 75 62 | 6c 65 20 77 69 74 68 20 |ng troub|le with |
|000040a0| 22 3f 22 20 69 6e 20 6e | 61 6d 65 2c 20 73 6f 20 |"?" in n|ame, so |
|000040b0| 6c 65 61 76 65 20 69 74 | 20 6f 75 74 20 6f 66 20 |leave it| out of |
|000040c0| 61 6e 63 68 6f 72 20 6e | 61 6d 65 2e 0d 66 75 6e |anchor n|ame..fun|
|000040d0| 63 74 69 6f 6e 20 50 72 | 69 6e 74 48 65 61 64 69 |ction Pr|intHeadi|
|000040e0| 6e 67 28 6e 61 6d 65 2c | 20 6c 65 76 65 6c 29 0d |ng(name,| level).|
|000040f0| 09 7b 0d 09 50 72 69 6e | 74 54 6f 4f 75 74 46 69 |.{..Prin|tToOutFi|
|00004100| 6c 65 28 22 3c 22 20 6c | 65 76 65 6c 20 22 3e 3c |le("<" l|evel "><|
|00004110| 41 20 4e 41 4d 45 20 3d | 20 5c 22 22 20 4e 6f 51 |A NAME =| \"" NoQ|
|00004120| 75 65 73 74 69 6f 6e 56 | 65 72 73 69 6f 6e 4f 66 |uestionV|ersionOf|
|00004130| 28 6e 61 6d 65 29 20 22 | 5c 22 20 3e 22 20 6e 61 |(name) "|\" >" na|
|00004140| 6d 65 20 22 3c 2f 41 3e | 3c 2f 22 20 6c 65 76 65 |me "</A>|</" leve|
|00004150| 6c 20 22 3e 22 29 3b 0d | 09 7d 0d 0d 66 75 6e 63 |l ">");.|.}..func|
|00004160| 74 69 6f 6e 20 4e 6f 51 | 75 65 73 74 69 6f 6e 56 |tion NoQ|uestionV|
|00004170| 65 72 73 69 6f 6e 4f 66 | 28 6e 61 6d 65 29 0d 09 |ersionOf|(name)..|
|00004180| 7b 0d 09 67 73 75 62 28 | 2f 5c 3f 2f 2c 20 22 22 |{..gsub(|/\?/, ""|
|00004190| 2c 20 6e 61 6d 65 29 3b | 0d 09 72 65 74 75 72 6e |, name);|..return|
|000041a0| 20 6e 61 6d 65 3b 0d 09 | 7d 0d 0d 23 20 41 6c 6c | name;..|}..# All|
|000041b0| 20 70 69 63 74 75 72 65 | 73 20 61 72 65 20 69 6e | picture|s are in|
|000041c0| 20 22 3a 47 72 61 70 68 | 69 63 73 3a 22 20 62 65 | ":Graph|ics:" be|
|000041d0| 73 69 64 65 20 22 3a 54 | 65 78 74 3a 22 2c 20 61 |side ":T|ext:", a|
|000041e0| 6e 64 20 73 6f 20 22 74 | 68 65 4c 6f 63 61 74 69 |nd so "t|heLocati|
|000041f0| 6f 6e 22 0d 23 20 73 61 | 79 73 20 67 6f 20 6f 6e |on".# sa|ys go on|
|00004200| 65 20 6c 65 76 65 6c 20 | 75 70 20 61 6e 64 20 74 |e level |up and t|
|00004210| 68 65 6e 20 64 6f 77 6e | 20 69 6e 74 6f 20 54 65 |hen down| into Te|
|00004220| 78 74 2e 0d 66 75 6e 63 | 74 69 6f 6e 20 50 72 69 |xt..func|tion Pri|
|00004230| 6e 74 47 49 46 54 61 67 | 28 74 68 65 4c 6f 63 61 |ntGIFTag|(theLoca|
|00004240| 74 69 6f 6e 2c 20 74 68 | 65 47 49 46 4e 61 6d 65 |tion, th|eGIFName|
|00004250| 2c 09 09 63 6f 70 79 4f | 66 4e 61 6d 65 29 0d 09 |,..copyO|fName)..|
|00004260| 7b 0d 09 50 72 69 6e 74 | 54 6f 4f 75 74 46 69 6c |{..Print|ToOutFil|
|00004270| 65 28 22 3c 50 3e 22 29 | 3b 0d 09 23 20 4f 6e 65 |e("<P>")|;..# One|
|00004280| 20 6c 69 74 74 6c 65 20 | 77 72 69 6e 6b 6c 65 2c | little |wrinkle,|
|00004290| 20 74 75 72 6e 20 74 68 | 65 20 22 23 22 20 69 6e | turn th|e "#" in|
|000042a0| 20 6e 61 6d 65 20 69 6e | 74 6f 20 22 25 32 33 22 | name in|to "%23"|
|000042b0| 0d 09 63 6f 70 79 4f 66 | 4e 61 6d 65 20 3d 20 74 |..copyOf|Name = t|
|000042c0| 68 65 47 49 46 4e 61 6d | 65 3b 0d 09 73 75 62 28 |heGIFNam|e;..sub(|
|000042d0| 2f 23 2f 2c 20 22 25 32 | 33 22 2c 20 63 6f 70 79 |/#/, "%2|3", copy|
|000042e0| 4f 66 4e 61 6d 65 29 3b | 0d 09 50 72 69 6e 74 54 |OfName);|..PrintT|
|000042f0| 6f 4f 75 74 46 69 6c 65 | 28 22 3c 49 4d 47 20 53 |oOutFile|("<IMG S|
|00004300| 52 43 3d 5c 22 22 20 74 | 68 65 4c 6f 63 61 74 69 |RC=\"" t|heLocati|
|00004310| 6f 6e 20 63 6f 70 79 4f | 66 4e 61 6d 65 20 22 5c |on copyO|fName "\|
|00004320| 22 20 41 4c 49 47 4e 20 | 3d 20 5c 22 74 6f 70 5c |" ALIGN |= \"top\|
|00004330| 22 3e 22 29 3b 0d 09 50 | 72 69 6e 74 54 6f 4f 75 |">");..P|rintToOu|
|00004340| 74 46 69 6c 65 28 22 3c | 50 3e 22 29 3b 0d 09 7d |tFile("<|P>");..}|
|00004350| 0d 0d 23 20 54 68 65 20 | 6d 61 69 6e 20 74 61 62 |..# The |main tab|
|00004360| 6c 65 20 6f 66 20 63 6f | 6e 74 65 6e 74 73 2e 0d |le of co|ntents..|
|00004370| 23 20 57 65 20 6a 75 73 | 74 20 70 72 69 6e 74 20 |# We jus|t print |
|00004380| 74 77 6f 20 6c 65 76 65 | 6c 73 2e 20 41 64 64 69 |two leve|ls. Addi|
|00004390| 74 69 6f 6e 61 6c 20 6c | 65 76 65 6c 73 20 77 6f |tional l|evels wo|
|000043a0| 75 6c 64 20 70 72 6f 62 | 61 62 6c 79 20 6e 65 65 |uld prob|ably nee|
|000043b0| 64 20 61 64 64 69 74 69 | 6f 6e 61 6c 0d 23 20 63 |d additi|onal.# c|
|000043c0| 6f 75 6e 74 65 72 73 20 | 68 33 43 6f 75 6e 74 65 |ounters |h3Counte|
|000043d0| 72 2c 20 68 34 43 6f 75 | 6e 74 65 72 20 65 74 63 |r, h4Cou|nter etc|
|000043e0| 20 61 6e 64 20 61 64 64 | 69 74 69 6f 6e 61 6c 20 | and add|itional |
|000043f0| 61 72 72 61 79 73 2e 0d | 66 75 6e 63 74 69 6f 6e |arrays..|function|
|00004400| 20 44 6f 54 4f 43 28 09 | 09 69 2c 20 6a 2c 20 6e | DoTOC(.|.i, j, n|
|00004410| 75 6d 53 75 62 48 65 61 | 64 73 2c 20 63 6f 6e 74 |umSubHea|ds, cont|
|00004420| 65 6e 74 73 2c 20 73 68 | 6f 77 53 75 62 73 29 0d |ents, sh|owSubs).|
|00004430| 09 7b 0d 09 50 72 69 6e | 74 54 6f 4f 75 74 46 69 |.{..Prin|tToOutFi|
|00004440| 6c 65 28 22 3c 48 32 3e | 3c 41 20 4e 41 4d 45 20 |le("<H2>|<A NAME |
|00004450| 3d 20 5c 22 54 61 62 6c | 65 20 6f 66 20 43 6f 6e |= \"Tabl|e of Con|
|00004460| 74 65 6e 74 73 5c 22 3e | 22 20 22 20 54 61 62 6c |tents\">|" " Tabl|
|00004470| 65 20 6f 66 20 43 6f 6e | 74 65 6e 74 73 20 22 20 |e of Con|tents " |
|00004480| 22 3c 2f 41 3e 3c 2f 48 | 32 3e 22 29 3b 0d 09 50 |"</A></H|2>");..P|
|00004490| 72 69 6e 74 54 6f 4f 75 | 74 46 69 6c 65 28 22 3c |rintToOu|tFile("<|
|000044a0| 55 4c 3e 22 29 3b 0d 09 | 66 6f 72 20 28 69 20 3d |UL>");..|for (i =|
|000044b0| 20 31 3b 20 69 20 3c 3d | 20 68 32 43 6f 75 6e 74 | 1; i <=| h2Count|
|000044c0| 65 72 3b 20 2b 2b 69 29 | 0d 09 09 7b 0d 09 09 6e |er; ++i)|...{...n|
|000044d0| 75 6d 53 75 62 48 65 61 | 64 73 20 3d 20 73 70 6c |umSubHea|ds = spl|
|000044e0| 69 74 28 54 4f 43 5b 69 | 5d 2c 20 63 6f 6e 74 65 |it(TOC[i|], conte|
|000044f0| 6e 74 73 2c 20 53 55 42 | 53 45 50 29 3b 0d 09 09 |nts, SUB|SEP);...|
|00004500| 69 66 20 28 63 6f 6e 74 | 65 6e 74 73 5b 6e 75 6d |if (cont|ents[num|
|00004510| 53 75 62 48 65 61 64 73 | 5d 20 3d 3d 20 22 22 29 |SubHeads|] == "")|
|00004520| 0d 09 09 09 2d 2d 6e 75 | 6d 53 75 62 48 65 61 64 |....--nu|mSubHead|
|00004530| 73 3b 0d 09 09 0d 09 09 | 23 20 50 72 69 6e 74 20 |s;......|# Print |
|00004540| 74 68 65 20 6d 61 69 6e | 20 68 65 61 64 69 6e 67 |the main| heading|
|00004550| 2c 20 68 72 65 66 20 69 | 73 20 66 69 6c 65 20 63 |, href i|s file c|
|00004560| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 74 6f 20 |orrespon|ding to |
|00004570| 63 68 61 70 74 65 72 0d | 09 09 50 72 69 6e 74 54 |chapter.|..PrintT|
|00004580| 6f 4f 75 74 46 69 6c 65 | 28 22 3c 4c 49 3e 20 3c |oOutFile|("<LI> <|
|00004590| 41 20 48 52 45 46 20 3d | 20 5c 22 54 65 78 74 2f |A HREF =| \"Text/|
|000045a0| 22 20 46 69 6c 65 4e 61 | 6d 65 46 6f 72 43 68 61 |" FileNa|meForCha|
|000045b0| 70 74 65 72 28 63 6f 6e | 74 65 6e 74 73 5b 31 5d |pter(con|tents[1]|
|000045c0| 29 20 22 5c 22 3e 20 22 | 20 63 6f 6e 74 65 6e 74 |) "\"> "| content|
|000045d0| 73 5b 31 5d 20 22 20 3c | 2f 41 3e 22 29 3b 0d 09 |s[1] " <|/A>");..|
|000045e0| 09 0d 09 09 23 20 74 68 | 65 6e 20 70 72 69 6e 74 |....# th|en print|
|000045f0| 20 74 68 65 20 73 75 62 | 68 65 61 64 69 6e 67 73 | the sub|headings|
|00004600| 0d 09 09 69 66 20 28 6e | 75 6d 53 75 62 48 65 61 |...if (n|umSubHea|
|00004610| 64 73 20 3e 20 31 29 0d | 09 09 09 7b 0d 09 09 09 |ds > 1).|...{....|
|00004620| 23 20 43 68 65 63 6b 20 | 74 68 65 72 65 20 61 72 |# Check |there ar|
|00004630| 65 20 73 6f 6d 65 20 68 | 65 61 64 69 6e 67 73 20 |e some h|eadings |
|00004640| 74 6f 20 73 68 6f 77 20 | 2d 20 64 6f 6e 27 74 20 |to show |- don't |
|00004650| 73 68 6f 77 20 69 66 20 | 6e 61 6d 65 20 73 74 61 |show if |name sta|
|00004660| 72 74 73 20 77 69 74 68 | 20 22 21 22 0d 09 09 09 |rts with| "!"....|
|00004670| 73 68 6f 77 53 75 62 73 | 20 3d 20 30 3b 0d 09 09 |showSubs| = 0;...|
|00004680| 09 66 6f 72 20 28 6a 20 | 3d 20 32 3b 20 6a 20 3c |.for (j |= 2; j <|
|00004690| 3d 20 6e 75 6d 53 75 62 | 48 65 61 64 73 3b 20 2b |= numSub|Heads; +|
|000046a0| 2b 6a 29 0d 09 09 09 09 | 7b 0d 09 09 09 09 69 66 |+j).....|{.....if|
|000046b0| 20 28 69 6e 64 65 78 28 | 63 6f 6e 74 65 6e 74 73 | (index(|contents|
|000046c0| 5b 6a 5d 2c 20 22 21 22 | 29 20 21 3d 20 31 29 0d |[j], "!"|) != 1).|
|000046d0| 09 09 09 09 09 7b 0d 09 | 09 09 09 09 73 68 6f 77 |.....{..|....show|
|000046e0| 53 75 62 73 20 3d 20 31 | 3b 0d 09 09 09 09 09 62 |Subs = 1|;......b|
|000046f0| 72 65 61 6b 3b 0d 09 09 | 09 09 09 7d 0d 09 09 09 |reak;...|...}....|
|00004700| 09 7d 0d 09 09 09 69 66 | 20 28 73 68 6f 77 53 75 |.}....if| (showSu|
|00004710| 62 73 20 3d 3d 20 31 29 | 0d 09 09 09 09 7b 0d 09 |bs == 1)|.....{..|
|00004720| 09 09 09 50 72 69 6e 74 | 54 6f 4f 75 74 46 69 6c |...Print|ToOutFil|
|00004730| 65 28 22 5c 74 3c 55 4c | 3e 22 29 3b 0d 09 09 09 |e("\t<UL|>");....|
|00004740| 09 66 6f 72 20 28 6a 20 | 3d 20 32 3b 20 6a 20 3c |.for (j |= 2; j <|
|00004750| 3d 20 6e 75 6d 53 75 62 | 48 65 61 64 73 3b 20 2b |= numSub|Heads; +|
|00004760| 2b 6a 29 0d 09 09 09 09 | 09 7b 0d 09 09 09 09 09 |+j).....|.{......|
|00004770| 23 20 68 72 65 66 20 63 | 6f 6e 73 69 73 74 73 20 |# href c|onsists |
|00004780| 6f 66 20 6c 6f 63 61 74 | 69 6f 6e 2c 20 66 69 6c |of locat|ion, fil|
|00004790| 65 20 6e 61 6d 65 20 28 | 66 72 6f 6d 20 63 68 61 |e name (|from cha|
|000047a0| 70 74 65 72 20 6e 61 6d | 65 29 2c 20 22 23 22 2c |pter nam|e), "#",|
|000047b0| 20 73 75 62 73 65 63 74 | 69 6f 6e 20 6e 61 6d 65 | subsect|ion name|
|000047c0| 0d 09 09 09 09 09 69 66 | 20 28 69 6e 64 65 78 28 |......if| (index(|
|000047d0| 63 6f 6e 74 65 6e 74 73 | 5b 6a 5d 2c 20 22 21 22 |contents|[j], "!"|
|000047e0| 29 20 21 3d 20 31 29 0d | 09 09 09 09 09 09 50 72 |) != 1).|......Pr|
|000047f0| 69 6e 74 54 6f 4f 75 74 | 46 69 6c 65 28 22 5c 74 |intToOut|File("\t|
|00004800| 3c 4c 49 3e 20 3c 41 20 | 48 52 45 46 20 3d 20 5c |<LI> <A |HREF = \|
|00004810| 22 54 65 78 74 2f 22 20 | 46 69 6c 65 4e 61 6d 65 |"Text/" |FileName|
|00004820| 46 6f 72 43 68 61 70 74 | 65 72 28 63 6f 6e 74 65 |ForChapt|er(conte|
|00004830| 6e 74 73 5b 31 5d 29 20 | 22 23 22 20 4e 6f 51 75 |nts[1]) |"#" NoQu|
|00004840| 65 73 74 69 6f 6e 56 65 | 72 73 69 6f 6e 4f 66 28 |estionVe|rsionOf(|
|00004850| 63 6f 6e 74 65 6e 74 73 | 5b 6a 5d 29 20 22 5c 22 |contents|[j]) "\"|
|00004860| 3e 20 22 20 63 6f 6e 74 | 65 6e 74 73 5b 6a 5d 20 |> " cont|ents[j] |
|00004870| 22 20 3c 2f 41 3e 22 29 | 3b 0d 09 09 09 09 09 7d |" </A>")|;......}|
|00004880| 0d 09 09 09 09 50 72 69 | 6e 74 54 6f 4f 75 74 46 |.....Pri|ntToOutF|
|00004890| 69 6c 65 28 22 5c 74 3c | 2f 55 4c 3e 22 29 3b 0d |ile("\t<|/UL>");.|
|000048a0| 09 09 09 09 7d 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |....}...|.}...}..|
|000048b0| 50 72 69 6e 74 54 6f 4f | 75 74 46 69 6c 65 28 22 |PrintToO|utFile("|
|000048c0| 3c 2f 55 4c 3e 22 29 3b | 0d 09 7d 0d 0d 66 75 6e |</UL>");|..}..fun|
|000048d0| 63 74 69 6f 6e 20 44 6f | 43 68 61 70 74 65 72 54 |ction Do|ChapterT|
|000048e0| 4f 43 28 09 09 69 2c 20 | 6a 2c 20 6e 75 6d 53 75 |OC(..i, |j, numSu|
|000048f0| 62 48 65 61 64 73 2c 20 | 63 6f 6e 74 65 6e 74 73 |bHeads, |contents|
|00004900| 29 0d 09 7b 0d 09 23 20 | 50 72 69 6e 74 20 6c 69 |)..{..# |Print li|
|00004910| 6e 6b 20 74 6f 20 6d 61 | 69 6e 20 74 61 62 6c 65 |nk to ma|in table|
|00004920| 20 6f 66 20 63 6f 6e 74 | 65 6e 74 73 0d 09 50 72 | of cont|ents..Pr|
|00004930| 69 6e 74 54 6f 4f 75 74 | 46 69 6c 65 28 22 3c 41 |intToOut|File("<A|
|00004940| 20 48 52 45 46 20 3d 20 | 5c 22 2e 2e 2f 22 20 63 | HREF = |\"../" c|
|00004950| 6f 6e 74 65 6e 74 73 46 | 69 6c 65 4e 61 6d 65 20 |ontentsF|ileName |
|00004960| 22 23 54 61 62 6c 65 20 | 6f 66 20 43 6f 6e 74 65 |"#Table |of Conte|
|00004970| 6e 74 73 5c 22 3e 4d 61 | 69 6e 20 43 6f 6e 74 65 |nts\">Ma|in Conte|
|00004980| 6e 74 73 3c 2f 41 3e 22 | 29 3b 0d 09 0d 09 23 20 |nts</A>"|);....# |
|00004990| 50 72 69 6e 74 20 63 68 | 61 70 74 65 72 27 73 20 |Print ch|apter's |
|000049a0| 74 61 62 6c 65 20 6f 66 | 20 63 6f 6e 74 65 6e 74 |table of| content|
|000049b0| 73 0d 09 69 20 3d 20 68 | 32 43 6f 75 6e 74 65 72 |s..i = h|2Counter|
|000049c0| 3b 0d 09 6e 75 6d 53 75 | 62 48 65 61 64 73 20 3d |;..numSu|bHeads =|
|000049d0| 20 73 70 6c 69 74 28 54 | 4f 43 5b 69 5d 2c 20 63 | split(T|OC[i], c|
|000049e0| 6f 6e 74 65 6e 74 73 2c | 20 53 55 42 53 45 50 29 |ontents,| SUBSEP)|
|000049f0| 3b 0d 09 69 66 20 28 63 | 6f 6e 74 65 6e 74 73 5b |;..if (c|ontents[|
|00004a00| 6e 75 6d 53 75 62 48 65 | 61 64 73 5d 20 3d 3d 20 |numSubHe|ads] == |
|00004a10| 22 22 29 0d 09 09 2d 2d | 6e 75 6d 53 75 62 48 65 |"")...--|numSubHe|
|00004a20| 61 64 73 3b 0d 09 23 20 | 50 72 69 6e 74 20 74 68 |ads;..# |Print th|
|00004a30| 65 20 6d 61 69 6e 20 68 | 65 61 64 69 6e 67 0d 09 |e main h|eading..|
|00004a40| 50 72 69 6e 74 54 6f 4f | 75 74 46 69 6c 65 28 22 |PrintToO|utFile("|
|00004a50| 3c 48 32 3e 20 3c 41 20 | 48 52 45 46 20 3d 20 5c |<H2> <A |HREF = \|
|00004a60| 22 23 22 20 63 6f 6e 74 | 65 6e 74 73 5b 31 5d 20 |"#" cont|ents[1] |
|00004a70| 22 5c 22 3e 20 22 20 63 | 6f 6e 74 65 6e 74 73 5b |"\"> " c|ontents[|
|00004a80| 31 5d 20 22 20 3c 2f 41 | 3e 3c 2f 48 32 3e 22 29 |1] " </A|></H2>")|
|00004a90| 3b 0d 09 69 66 20 28 6e | 75 6d 53 75 62 48 65 61 |;..if (n|umSubHea|
|00004aa0| 64 73 20 3e 20 31 29 0d | 09 09 7b 0d 09 09 50 72 |ds > 1).|..{...Pr|
|00004ab0| 69 6e 74 54 6f 4f 75 74 | 46 69 6c 65 28 22 5c 74 |intToOut|File("\t|
|00004ac0| 3c 55 4c 3e 22 29 3b 0d | 09 09 66 6f 72 20 28 6a |<UL>");.|..for (j|
|00004ad0| 20 3d 20 32 3b 20 6a 20 | 3c 3d 20 6e 75 6d 53 75 | = 2; j |<= numSu|
|00004ae0| 62 48 65 61 64 73 3b 20 | 2b 2b 6a 29 0d 09 09 09 |bHeads; |++j)....|
|00004af0| 7b 0d 09 09 09 23 20 54 | 72 69 6d 20 61 6e 79 20 |{....# T|rim any |
|00004b00| 6c 65 61 64 69 6e 67 20 | 22 21 22 0d 09 09 09 69 |leading |"!"....i|
|00004b10| 66 20 28 69 6e 64 65 78 | 28 63 6f 6e 74 65 6e 74 |f (index|(content|
|00004b20| 73 5b 6a 5d 2c 20 22 21 | 22 29 20 3d 3d 20 31 29 |s[j], "!|") == 1)|
|00004b30| 0d 09 09 09 09 63 6f 6e | 74 65 6e 74 73 5b 6a 5d |.....con|tents[j]|
|00004b40| 20 3d 20 73 75 62 73 74 | 72 28 63 6f 6e 74 65 6e | = subst|r(conten|
|00004b50| 74 73 5b 6a 5d 2c 20 32 | 29 3b 0d 09 09 09 50 72 |ts[j], 2|);....Pr|
|00004b60| 69 6e 74 54 6f 4f 75 74 | 46 69 6c 65 28 22 5c 74 |intToOut|File("\t|
|00004b70| 3c 4c 49 3e 20 3c 41 20 | 48 52 45 46 20 3d 20 5c |<LI> <A |HREF = \|
|00004b80| 22 23 22 20 4e 6f 51 75 | 65 73 74 69 6f 6e 56 65 |"#" NoQu|estionVe|
|00004b90| 72 73 69 6f 6e 4f 66 28 | 63 6f 6e 74 65 6e 74 73 |rsionOf(|contents|
|00004ba0| 5b 6a 5d 29 20 22 5c 22 | 3e 20 22 20 63 6f 6e 74 |[j]) "\"|> " cont|
|00004bb0| 65 6e 74 73 5b 6a 5d 20 | 22 20 3c 2f 41 3e 22 29 |ents[j] |" </A>")|
|00004bc0| 3b 0d 09 09 09 7d 0d 09 | 09 50 72 69 6e 74 54 6f |;....}..|.PrintTo|
|00004bd0| 4f 75 74 46 69 6c 65 28 | 22 5c 74 3c 2f 55 4c 3e |OutFile(|"\t</UL>|
|00004be0| 22 29 3b 0d 09 09 7d 0d | 09 7d 0d 0d 66 75 6e 63 |");...}.|.}..func|
|00004bf0| 74 69 6f 6e 20 57 72 69 | 74 65 46 69 6e 61 6c 43 |tion Wri|teFinalC|
|00004c00| 68 61 70 74 65 72 28 09 | 09 68 61 76 65 53 65 65 |hapter(.|.haveSee|
|00004c10| 6e 43 6f 6e 74 65 6e 74 | 73 29 0d 09 7b 0d 09 68 |nContent|s)..{..h|
|00004c20| 61 76 65 53 65 65 6e 43 | 6f 6e 74 65 6e 74 73 20 |aveSeenC|ontents |
|00004c30| 3d 20 30 3b 20 23 73 70 | 65 65 64 20 74 68 69 6e |= 0; #sp|eed thin|
|00004c40| 67 73 20 75 70 20 77 69 | 74 68 20 61 20 73 69 6d |gs up wi|th a sim|
|00004c50| 70 6c 65 20 22 62 6f 6f | 6c 65 61 6e 22 0d 09 0d |ple "boo|lean"...|
|00004c60| 09 23 20 47 65 74 20 6c | 69 6e 65 73 20 66 72 6f |.# Get l|ines fro|
|00004c70| 6d 20 6f 6c 64 4f 75 74 | 46 69 6c 65 20 74 6f 20 |m oldOut|File to |
|00004c80| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 6c 69 6e |the vari|able lin|
|00004c90| 65 2e 0d 09 77 68 69 6c | 65 20 28 67 65 74 6c 69 |e...whil|e (getli|
|00004ca0| 6e 65 20 6c 69 6e 65 20 | 3c 20 6f 6c 64 4f 75 74 |ne line |< oldOut|
|00004cb0| 46 69 6c 65 20 3e 20 30 | 29 0d 09 09 7b 0d 09 09 |File > 0|)...{...|
|00004cc0| 69 66 20 28 68 61 76 65 | 53 65 65 6e 43 6f 6e 74 |if (have|SeenCont|
|00004cd0| 65 6e 74 73 20 3d 3d 20 | 30 20 26 26 20 6c 69 6e |ents == |0 && lin|
|00004ce0| 65 20 7e 20 63 6f 6e 74 | 65 6e 74 73 4d 61 72 6b |e ~ cont|entsMark|
|00004cf0| 65 72 29 0d 09 09 09 7b | 0d 09 09 09 44 6f 43 68 |er)....{|....DoCh|
|00004d00| 61 70 74 65 72 54 4f 43 | 28 29 3b 0d 09 09 09 50 |apterTOC|();....P|
|00004d10| 72 69 6e 74 54 6f 4f 75 | 74 46 69 6c 65 28 22 22 |rintToOu|tFile(""|
|00004d20| 29 3b 0d 09 09 09 68 61 | 76 65 53 65 65 6e 43 6f |);....ha|veSeenCo|
|00004d30| 6e 74 65 6e 74 73 20 3d | 20 31 3b 0d 09 09 09 7d |ntents =| 1;....}|
|00004d40| 0d 09 09 65 6c 73 65 0d | 09 09 09 50 72 69 6e 74 |...else.|...Print|
|00004d50| 54 6f 4f 75 74 46 69 6c | 65 28 6c 69 6e 65 29 3b |ToOutFil|e(line);|
|00004d60| 0d 09 09 7d 0d 09 7d 0d | 0d 23 20 57 72 69 74 65 |...}..}.|.# Write|
|00004d70| 20 74 68 65 20 6d 61 69 | 6e 20 66 69 6c 65 2c 20 | the mai|n file, |
|00004d80| 74 61 62 6c 65 20 6f 66 | 20 63 6f 6e 74 65 6e 74 |table of| content|
|00004d90| 73 20 61 74 20 6f 6e 65 | 20 6c 65 76 65 6c 20 61 |s at one| level a|
|00004da0| 62 6f 76 65 20 74 68 65 | 20 63 68 61 70 74 65 72 |bove the| chapter|
|00004db0| 20 64 6f 63 75 6d 65 6e | 74 73 2e 0d 23 20 46 69 | documen|ts..# Fi|
|00004dc0| 6e 69 73 68 20 61 6e 79 | 20 6f 70 65 6e 20 63 68 |nish any| open ch|
|00004dd0| 61 70 74 65 72 20 66 69 | 72 73 74 2e 0d 66 75 6e |apter fi|rst..fun|
|00004de0| 63 74 69 6f 6e 20 57 72 | 69 74 65 4d 61 69 6e 43 |ction Wr|iteMainC|
|00004df0| 6f 6e 74 65 6e 74 73 46 | 69 6c 65 28 29 0d 09 7b |ontentsF|ile()..{|
|00004e00| 0d 09 69 66 20 28 6f 75 | 74 46 69 6c 65 20 21 3d |..if (ou|tFile !=|
|00004e10| 20 22 22 29 0d 09 09 46 | 69 6e 69 73 68 43 75 72 | "")...F|inishCur|
|00004e20| 72 65 6e 74 43 68 61 70 | 74 65 72 28 29 3b 0d 09 |rentChap|ter();..|
|00004e30| 0d 09 6f 75 74 46 69 6c | 65 20 3d 20 63 6f 6e 74 |..outFil|e = cont|
|00004e40| 65 6e 74 73 46 69 6c 65 | 4c 6f 63 61 74 69 6f 6e |entsFile|Location|
|00004e50| 20 63 6f 6e 74 65 6e 74 | 73 46 69 6c 65 4e 61 6d | content|sFileNam|
|00004e60| 65 3b 0d 09 0d 09 50 72 | 69 6e 74 54 6f 4f 75 74 |e;....Pr|intToOut|
|00004e70| 46 69 6c 65 28 22 3c 48 | 54 4d 4c 3e 22 29 3b 0d |File("<H|TML>");.|
|00004e80| 09 50 72 69 6e 74 54 6f | 4f 75 74 46 69 6c 65 28 |.PrintTo|OutFile(|
|00004e90| 22 22 29 3b 0d 09 50 72 | 69 6e 74 54 6f 4f 75 74 |"");..Pr|intToOut|
|00004ea0| 46 69 6c 65 28 22 3c 48 | 45 41 44 3e 22 29 3b 0d |File("<H|EAD>");.|
|00004eb0| 09 50 72 69 6e 74 54 6f | 4f 75 74 46 69 6c 65 28 |.PrintTo|OutFile(|
|00004ec0| 22 3c 54 49 54 4c 45 3e | 22 20 74 68 65 4d 61 69 |"<TITLE>|" theMai|
|00004ed0| 6e 54 69 74 6c 65 20 22 | 3c 2f 54 49 54 4c 45 3e |nTitle "|</TITLE>|
|00004ee0| 22 29 3b 0d 09 50 72 69 | 6e 74 54 6f 4f 75 74 46 |");..Pri|ntToOutF|
|00004ef0| 69 6c 65 28 22 3c 2f 48 | 45 41 44 3e 22 29 3b 0d |ile("</H|EAD>");.|
|00004f00| 09 50 72 69 6e 74 54 6f | 4f 75 74 46 69 6c 65 28 |.PrintTo|OutFile(|
|00004f10| 22 22 29 3b 0d 09 50 72 | 69 6e 74 54 6f 4f 75 74 |"");..Pr|intToOut|
|00004f20| 46 69 6c 65 28 22 3c 42 | 4f 44 59 3e 22 29 3b 0d |File("<B|ODY>");.|
|00004f30| 09 50 72 69 6e 74 54 6f | 4f 75 74 46 69 6c 65 28 |.PrintTo|OutFile(|
|00004f40| 22 3c 48 31 3e 22 20 74 | 68 65 4d 61 69 6e 48 65 |"<H1>" t|heMainHe|
|00004f50| 61 64 20 22 3c 2f 48 31 | 3e 22 29 3b 0d 09 50 72 |ad "</H1|>");..Pr|
|00004f60| 69 6e 74 54 6f 4f 75 74 | 46 69 6c 65 28 22 3c 48 |intToOut|File("<H|
|00004f70| 52 3e 22 29 3b 0d 09 50 | 72 69 6e 74 54 6f 4f 75 |R>");..P|rintToOu|
|00004f80| 74 46 69 6c 65 28 22 22 | 29 3b 0d 09 0d 09 44 6f |tFile(""|);....Do|
|00004f90| 54 4f 43 28 29 3b 0d 09 | 0d 09 50 72 69 6e 74 54 |TOC();..|..PrintT|
|00004fa0| 6f 4f 75 74 46 69 6c 65 | 28 22 22 29 3b 0d 09 50 |oOutFile|("");..P|
|00004fb0| 72 69 6e 74 54 6f 4f 75 | 74 46 69 6c 65 28 22 3c |rintToOu|tFile("<|
|00004fc0| 2f 42 4f 44 59 3e 22 29 | 3b 0d 09 50 72 69 6e 74 |/BODY>")|;..Print|
|00004fd0| 54 6f 4f 75 74 46 69 6c | 65 28 22 22 29 3b 0d 09 |ToOutFil|e("");..|
|00004fe0| 50 72 69 6e 74 54 6f 4f | 75 74 46 69 6c 65 28 22 |PrintToO|utFile("|
|00004ff0| 3c 2f 48 54 4d 4c 3e 22 | 29 3b 0d 09 50 72 69 6e |</HTML>"|);..Prin|
|00005000| 74 54 6f 4f 75 74 46 69 | 6c 65 28 22 22 29 3b 0d |tToOutFi|le("");.|
|00005010| 09 50 72 69 6e 74 54 6f | 4f 75 74 46 69 6c 65 28 |.PrintTo|OutFile(|
|00005020| 22 22 29 3b 0d 09 0d 09 | 63 6c 6f 73 65 28 6f 75 |"");....|close(ou|
|00005030| 74 46 69 6c 65 29 3b 0d | 09 7d 0d 0d 23 20 57 6f |tFile);.|.}..# Wo|
|00005040| 72 6b 69 6e 67 20 77 69 | 74 68 69 6e 20 74 68 65 |rking wi|thin the|
|00005050| 20 63 75 72 72 65 6e 74 | 20 62 6f 75 6e 64 73 20 | current| bounds |
|00005060| 6f 66 20 68 41 57 4b 2c | 20 77 65 20 63 61 6e 20 |of hAWK,| we can |
|00005070| 28 6a 75 73 74 20 62 61 | 72 65 6c 79 29 20 70 65 |(just ba|rely) pe|
|00005080| 72 73 75 61 64 65 0d 23 | 20 61 20 66 6f 6c 64 65 |rsuade.#| a folde|
|00005090| 72 20 74 6f 20 63 6f 6d | 65 20 69 6e 74 6f 20 65 |r to com|e into e|
|000050a0| 78 69 73 74 65 6e 63 65 | 20 62 79 20 75 73 69 6e |xistence| by usin|
|000050b0| 67 20 22 63 6f 70 79 22 | 2c 20 77 68 69 63 68 20 |g "copy"|, which |
|000050c0| 63 72 65 61 74 65 73 20 | 66 6f 6c 64 65 72 73 0d |creates |folders.|
|000050d0| 23 20 61 6c 6f 6e 67 20 | 74 68 65 20 73 70 65 63 |# along |the spec|
|000050e0| 69 66 69 65 64 20 70 61 | 74 68 20 69 66 20 70 6f |ified pa|th if po|
|000050f0| 73 73 69 62 6c 65 2e 20 | 53 6f 20 77 65 20 6d 61 |ssible. |So we ma|
|00005100| 6b 65 20 61 20 66 69 6c | 65 2c 20 63 6f 70 79 20 |ke a fil|e, copy |
|00005110| 69 74 20 74 6f 20 74 68 | 65 0d 23 20 66 6f 6c 64 |it to th|e.# fold|
|00005120| 65 72 20 77 65 20 77 61 | 6e 74 20 74 6f 20 65 78 |er we wa|nt to ex|
|00005130| 69 73 74 2c 20 61 6e 64 | 20 74 68 65 6e 20 72 65 |ist, and| then re|
|00005140| 6d 6f 76 65 20 62 6f 74 | 68 20 76 65 72 73 69 6f |move bot|h versio|
|00005150| 6e 73 20 6f 66 20 74 68 | 65 20 66 69 6c 65 2e 20 |ns of th|e file. |
|00005160| 55 67 68 2e 0d 66 75 6e | 63 74 69 6f 6e 20 4d 61 |Ugh..fun|ction Ma|
|00005170| 6b 65 46 6f 6c 64 65 72 | 28 66 6f 6c 64 65 72 50 |keFolder|(folderP|
|00005180| 61 74 68 4e 61 6d 65 2c | 20 09 78 46 69 6c 65 2c |athName,| .xFile,|
|00005190| 20 78 46 69 6c 65 53 6f | 75 72 63 65 2c 20 78 46 | xFileSo|urce, xF|
|000051a0| 69 6c 65 44 65 73 74 29 | 0d 09 7b 0d 09 78 46 69 |ileDest)|..{..xFi|
|000051b0| 6c 65 20 3d 20 22 54 65 | 6d 70 31 33 34 32 31 33 |le = "Te|mp134213|
|000051c0| 34 48 49 4b 45 21 22 3b | 0d 09 78 46 69 6c 65 53 |4HIKE!";|..xFileS|
|000051d0| 6f 75 72 63 65 20 3d 20 | 53 54 44 50 41 54 48 20 |ource = |STDPATH |
|000051e0| 78 46 69 6c 65 3b 0d 09 | 78 46 69 6c 65 44 65 73 |xFile;..|xFileDes|
|000051f0| 74 20 3d 20 66 6f 6c 64 | 65 72 50 61 74 68 4e 61 |t = fold|erPathNa|
|00005200| 6d 65 20 78 46 69 6c 65 | 3b 0d 09 70 72 69 6e 74 |me xFile|;..print|
|00005210| 20 22 48 65 6c 6c 6f 22 | 20 3e 20 78 46 69 6c 65 | "Hello"| > xFile|
|00005220| 53 6f 75 72 63 65 3b 0d | 09 63 6c 6f 73 65 28 78 |Source;.|.close(x|
|00005230| 46 69 6c 65 53 6f 75 72 | 63 65 29 3b 0d 09 63 6f |FileSour|ce);..co|
|00005240| 70 79 28 78 46 69 6c 65 | 53 6f 75 72 63 65 2c 20 |py(xFile|Source, |
|00005250| 78 46 69 6c 65 44 65 73 | 74 29 3b 0d 09 72 65 6d |xFileDes|t);..rem|
|00005260| 6f 76 65 28 78 46 69 6c | 65 53 6f 75 72 63 65 29 |ove(xFil|eSource)|
|00005270| 3b 0d 09 72 65 6d 6f 76 | 65 28 78 46 69 6c 65 44 |;..remov|e(xFileD|
|00005280| 65 73 74 29 3b 0d 09 7d | 0d 00 00 00 00 00 00 00 |est);..}|........|
|00005290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 00 01 00 00 00 01 c0 | 00 00 00 c0 00 00 00 96 |........|........|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005330| 0b 24 54 65 78 74 54 6f | 48 54 4d 4c 02 00 00 00 |.$TextTo|HTML....|
|00005340| 54 45 58 54 4b 45 45 4e | 01 00 ff ff ff ff 00 00 |TEXTKEEN|........|
|00005350| 00 00 54 45 58 54 4b 45 | 45 4e 01 00 ff ff ff ff |..TEXTKE|EN......|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 ad d1 1d 20 00 00 | 52 09 00 00 02 56 00 00 |..... ..|R....V..|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00005410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005420| 00 00 00 00 00 00 00 06 | 00 04 00 37 00 06 01 99 |........|...7....|
|00005430| 02 7b 00 37 00 06 01 99 | 02 7b ae 4e 22 d4 00 00 |.{.7....|.{.N"...|
|00005440| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 46 |........|.......F|
|00005450| 00 05 01 00 00 00 00 00 | 3a 2d 66 41 74 6c 61 73 |........|:-fAtlas|
|00005460| 3a 43 57 20 43 45 44 41 | 52 3a 44 72 61 67 5f 6f |:CW CEDA|R:Drag_o|
|00005470| 6e 20 4d 6f 64 75 6c 65 | 73 3a 68 41 57 4b 20 70 |n Module|s:hAWK p|
|00005480| 72 6f 67 72 61 6d 73 3a | 24 54 65 78 74 54 6f 48 |rograms:|$TextToH|
|00005490| 54 4d 4c 02 40 81 00 00 | 00 04 00 06 00 04 00 00 |TML.@...|........|
|000054a0| 00 0a 00 09 06 4d 6f 6e | 61 63 6f 00 00 00 00 04 |.....Mon|aco.....|
|000054b0| ae 4e 22 d5 00 00 00 08 | 00 37 00 06 01 99 02 7b |.N".....|.7.....{|
|000054c0| 00 00 01 00 00 00 01 c0 | 00 00 00 c0 00 00 00 96 |........|........|
|000054d0| 01 a0 a5 d4 0c 20 00 00 | 00 1c 00 96 00 05 4d 50 |..... ..|......MP|
|000054e0| 53 52 00 00 00 32 48 41 | 57 4b 00 00 00 3e 45 54 |SR...2HA|WK...>ET|
|000054f0| 41 42 00 00 00 4a 45 46 | 4e 54 00 00 00 56 4a 41 |AB...JEF|NT...VJA|
|00005500| 47 5a 00 00 00 62 57 53 | 49 5a 00 00 00 6e 03 ed |GZ...bWS|IZ...n..|
|00005510| ff ff 00 00 00 00 01 a0 | a4 78 03 f3 ff ff 00 00 |........|.x......|
|00005520| 00 4c 00 00 00 00 03 ec | ff ff 00 00 00 96 01 a0 |.L......|........|
|00005530| a4 94 03 eb ff ff 00 00 | 00 9e 01 a0 a4 8c 03 ed |........|........|
|00005540| ff ff 00 00 00 ac 01 98 | d3 f0 03 ee ff ff 00 00 |........|........|
|00005550| 00 b4 01 a0 a4 64 00 00 | 00 00 00 00 00 00 00 00 |.....d..|........|
|00005560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+